Many investors buy real estate with tenants in place, whether it's a property to buy and hold or something to rehab. Tenants aren't a bad thing, you just have to be aware of what you need before closing escrow to lower the risk of the tenants being a liability and costing you a tremendous amount of money.
Even rehabbers buy properties with tenants because either the lease ends soon and you'll collect rents while you wait for the expiration date, or you plan to offer the tenant "cash for keys" so that move out before their lease expires.
There are a number of potential problems if you don't prepare. First, as soon as you take title to the property they may stop paying their rent and they won't move. I've had this happen. You don't get the rental income you were expecting and you now have to pay to evict them. On top of that, they may very well destroy your property on the way out; in my case, they did destroy the property.