When you pay rent at the beginning of the month, you pay ahead for the month you will live there. When you buy, your mortgage payment is for the month you just lived there. This is why there is at least a one month gap between closing and the first payment date.