The NBA has a hard cap, but with a major exemption, as I noted before. (You can not exceed the cap for free agents, but you can to re-sign your own players. So if the Knicks wanted to get Stephen Curry from the Warriors, they’d have to fit him within the cap — but if they re-sign Carmelo when his contract is up, they can go pretty much as high as they like.)
Teams manipulate that all the time.
There are actual penalties in MLB for going over the threshold. They’re monetary penalties. Only a few clubs are currently paying them. It does serve as a disincentive.
No it doesn’t. The NBA is a soft cap, it’s softer when you’re resigning your own players, and much like MLB the punishment is a luxury tax.
https://en.wikipedia.org/wiki/NBA_salary_cap
The only real disincentive is that smart teams don’t overpay for players anyway, and tax results in accelerated overpaying. It’s bad enough to overpay your players and the get all the money, it’s worse when a chunk goes back to the league instead of to the player. But teams that are comfortable overpaying will pay the tax.