Having friends means that you can build bases where if you ask nicely, rather than having to invade. It prevents those friends from undermining you in a lot of cases. It makes them help you when you need, e.g. to get your hands on someone plotting attacks against you. It makes them more likely to trade with you under advantageous terms. I am sure you could think about at least a dozen other cases in a couple of minutes.
Soft power is spending pennies to convince other countries to do your dirty work.
> build bases where if you ask nicely, rather than having to invade
How much of that actually came from soft power rather than "hard power", like USA actions in WW2?