Very dangerous IMO, as if the seller doesn't leave when agreed, you're now an accidental landlord. It's not typically caused because the seller planned to screw you all along, but often their other housing doesn't come through as expected and it's easiest for them to just stay until they figure it out.
I helped a colleague of mine buy a home for his family last summer and the seller asked for this because she was using some of the proceeds from the sale of her home to close on her new condo. My colleague was working on a case where this very thing happened so he was keenly aware of the risks. The way we dealt with it was by giving the seller X number of days of possession after closing, rent free, with a substantial per day charge if she did not vacate by the agreed date. This was secured by having a portion of her sales proceeds held in escrow and not to be released to her until possession was granted to the buyer. This ensured she has proper motivation to actually leave when she agreed and it made sure the buyer has security in the event something went wrong and she was unable to leave as agreed.