Each species of freshwater fish has evolved to function in a very specific environment. This includes the water parameters (GH, pH and temperature) as well as all other factors. Temperature is crucial because fish are ectotherms which means they do not produce internal heat but rely on the temperature of the water to carry out their essential life processes.
With this in mind, each species has a temperature range in which it will be able to function with the least amount of effort. Energy from food is used for several things in fish just as it is in all animals and plants. Temperature drives the fish's metabolism. With ectotherms, as soon as the temperature moves too far away from what is needed, the fish begin to have difficulties. This occurs if the temperature lowers too much, or increases too much. Temporary fluctuations can usually be managed, depending upon various factors, but long-term the fish cannot manage.
This not only means that some vital life processes may not function, it also causes stress, which if not resolved will itself increase. Stress weakens fish in several ways, such as lessening the effectiveness of their immune system, slowing or stopping various internal processes, etc.