A hotel program books your room on points. They take the liability on their books for your point balance, and use it to pay the hotel.
Since hotels are mostly independently owned, they need to get real cash from the chain for your stay. Hotels actually benefit by filling unsold rooms with reward night guests, getting revenue from the loyalty program for a room that would have sat empty.