Standing and staying may sound the same but in fact, they are two very different things.
To stay means to remain, to keep in the same place. So if you say, “There were no free seats on the bus so we had to stay there”, it suggests that someone kept you there against your will. You were not free to leave. But that’s not true. You didn’t have to stay there in this example, you could have easily left the bus.
To stand means to not sit down, to be upright on your legs. So if there are no free seats on a bus, you have to stand.
A: When I got the train to Plzen, I had to stand because all the seats were occupied. But that wasn’t the worst thing – I missed the last train home so I had to stay in Plzen for the night!