Staying in same lab for a while after finishing PhD?
The original intent of the post-doc, in addition to giving a young PhD time to establish a solid publication record, was to learn and develop a new skill, technique, or research area. A few decades ago, it was not uncommon for newly minted PhDs to go straight into a TT position; today, its quite rare, making the post-doc almost assumed, and many do elect to stay in the same environment.

In my opinion, for someone who aspires to an academic career, the best post-doc is completed elsewhere: it extends one's education beyond their PhD studies into a new (but probably related) domain, builds on their research toolbox, and introduces one to a new way of thinking (avoiding so-called 'intellectual inbreeding').

However, there's nothing inherently wrong with doing a post-doc in the same lab, except that it usually doesn't offer a whole lot of opportunity to learn something new. I can think of several individuals who landed a great TT position after a post-doc in the same lab. But do consider that doing a post-doc somewhere else might make you more marketable in the long run.