It might just be a matter of frequency of use:
- "to stay the night": I hadn't heard that often
- "to stay for the night": Means somebody does not need to go home, and may sleep here.
- "to stay tonight": This seems rare. It would probably be understood the same way.
StackExchange claims that "to stay the night" is more common: https://english.stackexchange.com/questions/198419/