Yes they do.
Bookies couldn't care less who wins and loses.
That's why they spend a fortune coming up with a "line" that attempts to even out the bets on both sides.
You mean they can take the opposite side of opposing bets? Duh. But they don't have to, do they? And sometimes they can't.
By adjusting the odds in his favour or by having a point spread, the bookmaker will aim to guarantee a profit by achieving a ‘balanced book’, either by getting an equal number of bets for each outcome, or (when he is offering odds) by getting the amounts wagered on each outcome to reflect the odds. When a large bet comes in, a bookmaker can also try to lay off the risk by buying bets from other bookmakers. The bookmaker does not generally attempt to make money from the bets themselves, but rather by acting as a market maker and profiting from the event regardless of the outcome. Their working methods are similar to that of an actuary, who does a similar balancing of financial outcomes of events for the assurance and insurance industries.
Your complete ignorance of sports betting is ingratiating.
Stick with your studies, get good grades, and stay away from sports betting.