Can You Sell a House With Tenants Still in It?
Yes. A lease is attached to the property, not to you, so it survives the sale. The buyer takes the property subject to the existing tenancy and becomes the landlord for whatever is left of the term, on the same terms your tenant already has. Nobody has to move out for the sale to happen.
This surprises a lot of owners, usually because the first agent they spoke to told them to get the place empty before listing. That advice is not wrong for a retail sale. Most buyers using a mortgage want to move in, so an occupied property narrows the buyer pool to investors.
The catch is what "get it empty" actually costs. You are looking at a notice period, possibly a legal process if the tenant does not leave, lost rent while the unit sits, and then a turnover: paint, flooring, cleaning, whatever the last few years did to the place. For a landlord who is already tired and already behind on repairs, that is a lot of money and effort spent to make the property attractive to someone else.
Selling to a St. Louis cash home buyer who takes it occupied skips all of it. The tenant stays, the rent keeps coming in until closing, and you stop being the landlord on the day it closes.