Upload & Sell: Off
There are a couple of factors on why they loop.
First off is the maximum grade steel wheels can take on steel rails before they start sliding. If memory strikes me the maximum pct. grade is something like 6%, or thereabouts. After that you start slipping all over the place. You might be able to get an additional percent, or so, by going to a locomotive like a Shay or Climax, but it's been quite some time since those saw the main line. :-)
An additional reason is fuel consumption. If you can keep your gradient to 1-2% maximum then you will use a lot less fuel to pulling a train up the grade. As Tehachapi is the main line pretty much most trains that come from the central midwest will see the Loop.
Tehachapi Loop is one of the more extreme cases of looping trains to gain altitude. However, there's one in Switzerland (Gotthardbahn) which will do it one better. It's a loop INSIDE a tunnel. Must've been some kind of engineering to get that one right, eh?
If you want to read further check out the
... lol why do they have it making a huge lap like that instead of just going up the hill?