The advantage of the house is over all the players on the site combined. All those players will certainly lose from 1% to 10% of their money to the house. But 90%+(and usually it's more than 95%) will be returned to players in the form of wins and bonuses, and it is absolutely not necessary that everyone who's winning or getting bonuses will eventually lose it to the house.
Couldn't have said it any better! I'll just give an example:
Let's suppose you wagered hundred bucks on a slot game with 95% return to playerr (rtp), $1 per spin. This doesn't mean you will necessarily end up with $95 and the casino earning $5. You could end up with thounds of dollars as you could lose all your money. However, if you play longer (wager more) then the chances are higher your balance will be closer to 95% of the amount you started with. The same if there are many players wagering small amounts.
This is why casinos need as many players as possible, to pay the winners from the losses of others.
Margin works differently. 95% rtp means that on average a player gets 95% of their bet. This is true for every bet placed, not for the initial deposit. That is, the more a player plays, the higher the probability that his deposit will turn into zero. Since if you take 100 dollars and multiply them by 0.95 (at least in parts, at least in whole), in the end you will have an amount close to zero or zero.