If you book your room through a third party site, you generally get a better rate because these sites sell room-nights when the hotel is not busy. So if a hotel has 50 rooms left to sell, it might give a third party site 10 at a discount to hedge its bets.