In my case it was an acquisition and roll up - they acquired my company and one of my competitors, combined the two together and brought in a seasoned executive w/ IPO experience to lead the NewCo. I was retained to be the CTO, though it's tremendously difficult to go from being the boss to having a boss and left a little over a year later.