Why do we use a resistor to dissipate energy if it is an economical loss?
The resistances assure this moderation; they act as dams that control the flow of current (similar to the flow of water).
Certainly, a high water flow will produce more energy in a hydroelectric plant, but could eventually destroy plant equipment.
Likewise, an intense current can damage the circuits. The resistances allow us to refine this equilibrium by applying certain restrictions to the flow of current.
At a high level, you get nothing for free, so you need to consume energy to do a useful job. The simplest application of a resistor is an electric heating element.
We circulate electricity through the resistor, to generate heat, for a specific use (cooking, heating the house, etc.). Another example is an incandescent bulb – in this case the resistor generates both heat and light.
In electronics, resistors are used to make all kinds of circuits that also do a useful job. In many of these cases, energy dissipation is an undesirable by-product of the more useful function of the resistor, which may be to change the voltage of an electrical circuit.
The resistors do more than dissipate the electrical energy. They are a very cheap voltage converter! Whenever you have something that generates a current but you really want a voltage change, you use resistance.
Examples include: in the collector of a bjt, in the drain of a FET, in the plate circuit of a pentode vacuum tube.
All these devices modulate a current, but the next step probably wants a voltage.
We have therefore placed a resistor between this element and vcc and the resistor converts very efficiently and linearly the change of current into a voltage change.
We also use resistors, in pairs, as voltage dividers when we need voltage.
A pair of resistors crossed by the same current will divide the voltage proportionally.
They also constitute passable constant current sources, when we use a resistor with high ohmic resistance at high voltage.
We try to avoid using resistors only to dissipate the current, we use them when they do something we want.