Vegas sets the line (straight up/ money line, Point Spread, and Over/Under) in hopes of getting equal amounts of money bet on both sides. If that happens, there is no way Vegas can lose money. They would net 4.5% on every dollar bet.
Why 4. 5%? Because you must bet $11 to win $10. So you bet $11 on team A and I bet $11 on Team B. A total of $22 is collected and $21 will be paid to the winner. The extra $1 is for Vegas. It doesn't sound like much but there are millions bet every week and if done correctly (even money on both sides) Vegas can't lose.
What happened on Sunday is there clearly wasn't even money placed on the games and, in Vegas' view, the wrong side won. Often times it goes the other way where the money is bet on the incorrect side and Vegas racks up.
Hope this helps. It gets a lot more difficult with ALL the different wager types and prop bets.