Why do food manufacturers use trans-fats?

I may be incorrect, but I believe I read a while ago that using trans-fatty acids (partially saturated oils) is a relatively recent process - and that these types of fats are especially harmful because of damage they did to arterial walls.

In any case, if this is true, why did producers switch over to using trans-fats?

Cost.

Melting point.

Hydrogenation (which produces trans-fatty acids) raises the melting point of oils, so that a liquid fat can be used to make a margarine that is solid at room temp.

The process is also useful as it can be used to precisely control the final melting point. Those trans-fatty acids tend to have sharp melting curves around body temperature - i.e. they are mostly solid at room / fridge temp, and mostly liquid at body temp. If the fats melted sooner, then the stuff would melt in your hand. If they melted later, then the food would taste less creamy and leave a film on the roof of your mouth.

Compare cheap margarine with more expensive stuff.