The answer lies in the secondary market. Both new, old stock and used "O" gauge trains are readily available. The days of five dollar cars may be gone, but in my area, there are still decent non-operating cars to be had for $10-$15 each. Plenty of good running engines in the fifty dollar range. Transformers such as the 1033 or 1044 can be had for around thirty dollars that have been checked and had their cords replaced.
That leaves track.
The problem with our hobby is the emphasis on the high end, both new and used.
Someone starting out doesn't need original postwar 6464 boxcars in cherry condition, or collector grade postwar berkshires.
6014 boxcars and 2018 steamers are a fine start.
I just noticed that this is posted under "S" gauge. I am not that familar with the "S" gauge market, I expect much of what I wrote above holds true there too.