When it comes to the purpose of the resistors and capacitors in the power circuit, it depends on the specific situation and their own features.
In general, resistor is used to act as current-limiting, voltage stabilization, current-shunting and circuit protection, etc. For instance, piezoresistor-circuit protection; Common resistor-voltage stabilization and short circuit protection; Wire wound resistor-EMC and lightning stroke releasing.
While capacitor is mainly to realize bypass, decoupling, filtering and storing energy in the power supply circuit.