Well Amanda. Why would they not have to pay rent? If they have a lease and use the property to live in, they owe the rent. That would be the case even if the house were in foreclosure. There is no such thing as staying for free and, with the exception of rent skimming, there is no law that I am aware of that says that the landlord has to use the rent money to pay the mortgage.
The new owner takes subject to tenant's existing rights whatever those may be. If it's a month-to-month and the former owner did not give proper notice, the new owner has to give proper notice and the tenant has to pay. The other issue is, where does the tenant go to get the deposit back after he/she moved out? The former owner should either give the deposit back to the tenant or transfer it to the new owner pursuant to the law. It's my understanding that, in CA, former owner and new owner are jointly and serverally liable for the return of the deposit, which means that the new owner could be ordered to return the deposit even if the old owner did not transfer the deposit to the new owner, which is fair as the tenant should not be caught in the middle. So, regardless of whether you represent the buyer or the seller, it would be a good idea to address the return of the deposit in the purchase agreement if you want to avoid problems down the road.