I can try to explain and hopefully answer more questions people have on why it is necessary. I'll use 4130 alloy steel as an example seeing as most bars are made from that material.
When you buy 4130 Alloy steel in most cases it comes normalized. Generally, with 4130, normalizing is heating the metal to approximately 1600F then air cooling. This puts the metal in a good machineable and weldable state.
When you weld 4130 you heat it above its critical temperature and the area welded is called a heat-effected zone. As the weld progresses, the heated metal behind it will be cooled both by exposure to the air, and by the quenching affect of the adjacent cooler metal. The heat- effected zone will then cool more rapidly than if the whole part had been evenly heated and cooled as a unit. The weld is, in effect, quenched and is therefore much more brittle than the surrounding metal.
To reduce the brittleness around the weld, stress relieving is the simplest step. Stress relieving is heating the entire area, preferably the entire part, to 1200F and then air cooling.
The best way to deal with the weakening metal and brittleness is a complete heat treat. MatWeb lists this process at somewhere around 1000F for the length of time required for a thorough temperature throughout the part. Then followed by an immediate quench in either water or oil. The quench must take place within one minute of removing the parts from the oven.
MatWeb lists these figures for round 1" stock:
AISI 4130 Normalized
Tensile Strength 97200psi
Yield Strength 63100psi
AISI 4130 Water Quench from 900F
Tensile Strength 161000psi
Yield Strength 13800psi
According to this data heat treating 4130 roughly doubles the strength compared to normalized. Also, do not forget that the heat-affected zone on 4130 without a stress relieve has a lower strength than that of popular mild steels such as 1020DOM.
I left a ton of information out, so if someone actually cares to read more, I'll write more. It's difficult for me to write a partial explanation and still make some amount of sense. Sorry I jumped around