"Why does the government need to build high speed trains?"
a lot of the time the government runs them because high-speed trains are risky. if the public want HSR within reasonable reach, and no company is willing to provide it, politicians do it instead. this is more commonplace in europe since politicians use rail as a method to gain voters, such as in Spain & even China.
"Why can't private industry build high speed trains"
never said they couldn't. they can, and i'd support it. high-speed rail is actually profitable, and some companies are starting to develop. I'd recommend you look into Brightline, a private train-operating entity in Florida developing a line between Miami & Tampa.
there is one thing, however...
https://www.railwayage.com/news/part-4-of-5-is-this-the-end-of-the-line/
a landowner wants the government to end a private project. if the court took his side, this would threaten all future private rail prospects in texas.
video here:
https://youtu.be/hJfyuoIWhm0?t=495
"Ever since the 20th century, government has built all of the commuter rails. Why?"
commuter rail, along with regional and urban rail, doesn't profit quite as well as HSR does. the margins of profit are much lower. for smaller networks to make a profit, they'd have to be densely connected on day one of opening instead of one singular line opening every few years. when the government uses taxes to operate it, at the very least a good portion of people are using it.
"If there is a need for something, let the free market handle it. "
i would agree, since due to regulations and monopolies the free market has been struggling. however, the free market is also beating around the bush with haphazard promises. one example is the Hyperloop technology. it's been talked about since the early 2010s and has been experimented on since. however, the only thing worth of note from Hyperloop is two people riding in a pod at 100 mph back in 2020, and nothing of value since. what worse, it's depended on government subsidy to perform these tests.
yeah, i understand the frustration with CAHSR, which has done a terrible job of constructing the High-speed line efficiently.
https://youtu.be/hJfyuoIWhm0?t=284
that video i posted earlier also shows Brightline's activity in Cali. you might like this YouTuber.
"However you paid to drive on those... much less than what the government steals..."
with the flaws and costs with cars, they couldn't compete with the railroads and go bust