I don't think we've ever tried having the market solely allocate resources. I think pretty much every government has regulated trade, collected taxes, that sort of thing. What seems to have worked best would be letting the market allocate resources to some extent, but collecting taxes and investing in long term goals (such as research and infrastructure). But maybe this isn't necessary, maybe in a truly free market there would always be genius entrepreneurs like Elon Musk appearing every now and again to progress humanity. Still, there's a massive difference between the kinds of long term planning that modern western democracies already do and a communist dictatorship.
I'm not saying it's untrue because it's taught early, but I am saying that it seems you haven't done much due diligence beyond that.
(Indeed, in a certain sense, neoliberalism can no longer be called a "pure" market system, since the government becomes property of the financial and landowning rentier classes, and is used to fight a class war by actively suppressing all other profits and wages in order to increase rent and debt.)
Centrally planned economies have been tried. The Soviet Union discouraged a lot of research into areas like psychology that they saw as pointless; artists had to conform to traditional styles. It didn't turn out very well. Letting the market allocate resources has a lot of inefficiencies, but it works better than any alternative that has been tried.