These days NATO is most clearly recognized as a list of countries that the USA as global military hegemon is ready to go to war to defend, and this is hugely beneficial to a country that wants to be a global military hegemon. Wars are expensive and ideally you don’t want to fight any. The existence of an organization like NATO means that (a) none of the member nations are going to fight each other, (b) none of the member nations are going to try to rival the military hegemon, (c) nobody outside of the organization is going to start a war with any of the members. For a military hegemon whose main interest is ensuring global peace so that it can continue to reap the rewards of a global economic system that it is also hegemon over, getting to mark off a large chunk of the developed world as “no wars here” is well worth paying for. In a very, very loose sense it’s sorta like an olden-days imperial power with tributaries, but the “tribute” is realized in the form of the fact that the US government’s position as military and economic hegemon means that it can manufacture dollars for free and other countries will trade goods and services for them.
On top of that, concentrating the defense spending of the alliance within the US is good for the US economy and critically important for maintaining the R&D efforts that the US military relies on to maintain a technological edge over potential rivals outside of the alliance.