The first reason it's hard to just landfill it is optics. Local government asked people to sort their trash, made a big deal about it. And it's a scandal when people find out of course it's just being buried with the rest of the stuff. Recyclers were able to do two things; a) play a shell game which diverts the waste in an opaque, hopefully deniable way and b) deal with the waste more cheaply than landfilling it. They did this by exporting it, and all the externalities.
I mean, your argument is good but I feel it's contradicted by reality in a sense; megatons of waste plastic were being sent to China before the import ban.
You have to pay to put stuff in landfill, whereas the recyclers were paying _you_ to take the waste.
I think you might also be surprised by the cost of landfill. Sure, there's plenty of space, but there's not as much government approved, environmentally audited space as you might want - that won't leach into the water table, has good geography, neighbours who won't NIMBY it, no rare frogs that live there etc. Obviously it all needs ISO 27000 management, union labour and regular safety and environmental audits.
Caring about none of the above is how Chinese waste entrepreneurs could take mixed plastic from 1/2 way around the world and make a profit out of it, instead of losing money putting it into the ground. Their margins are slim and they have to pay for landfill too (much less of course), so dumping it in the ocean or similar saves money unless they get caught.
(For what it's worth I do agree that putting it in the ground might be the best thing to do, i.e, cheapest considering all externalities, and local government should just be transparent about what actually happens to your recycling).