That's the main problem, building a rail line zigzagging around the country is arguably a ton easier than having to legislate, seize, steal and forcibly bulldoze a straight path for a maglev.
…and sometimes there are obstacles that you can’t bulldoze. Mountains, rivers, towns, etc. You can build tunnels and bridges but it’s very expensive just to get people to their destination a little faster. The temptation to add a little bend is strong, but the smaller the minimum turning radius, the slower the maximum speed, and the higher the chance that you don’t need maglev at all.
It’s very dependent on geography. Ironically the US is a much better candidate for maglev than Europe with its wide unpopulated expanses.