What’s basically happened is the US is now AWS, providing cloud defense services via NATO membership, and is paid back via purchases of military tech, favorable trade, and cemented US dollar and cultural dominance.
The US military’s economies of scale mean adding another country to the alliance is a trivial cost. When you already have enough nukes to cause human extinction, it’s not like you need to build more.
You can of course attempt to self-host your own military.
However, self-hosting is cost-prohibitive for a small country, so I would argue it actually makes sense for all parties to outsource to the US, and is a good deal for everyone involved.
While it’s cute that a tiny country might pretend to have a military, if you’re Latvia with less than 2 million people, you have to know there’s no amount of spending you could do that would protect against invasion from a 70X bigger country like Russia.