It seems like a car would be much simpler to design and use.
I think you will find the answer is that the first locomotives that were invented had a large, engine room in which the fuel for the train was fed manually by people. The reason this worked for a train was that it had the room for such power to be produced whereas a car would have had to be the size of 2 semi trailers to produce that amount of power. In addition, the trains had to use less power as they are running on a track, compared to that of a car which has the problem of crossing multiple types of terrain. Also a train allows much more passengers than a car which in the early days of transport by train, appealed to many as to create and maintain a train would have been very expensive so they need a way to pay this off. Note that the first car was built only 3 years after the train but this was a hydrogen combustion engine, not the petrol engine which was created almost a century later.
And what do you expect to use cars on? Start lookinhg at pictures of old roads, and you may get an idea of the difficulty of distance travel.
Incidentally, it was the league of American wheelmen (we'd call them bicyclists nowadays) that made a major push for good roads. Note the high clearance on wagons and earlty cars. Roads were rutty messes. In winter, it was worse - I have a document explaining what would happen when two wagons met on a narrow road - one would end up in the ditch and woyld have to be hauled out. Plus, a car can't pull a plow or do anything else around a farm. That's a lot of wealth tied up in something that only can be used to travel to town.