Why do people still build their own CMSes and frameworks?

A few times in the last couple of years, I've come across companies or agencies writing their own CMSes or frameworks.

Not as a learning exercise, which I think every Developer does at some point as part of their learning, but to host production applications.

With so many free and open source options - there are Drupal, WordPress, Symfony and Laravel just in the PHP ecosystem - why would people use custom or proprietary CMSes or frameworks?

One reason is vendor lock-in.

If someone is locked into your CMS, framework or hosting platform, it's difficult for them to move away.

That's one of the main benefits of open source software.

There isn't just one company that provides services for it and customers can choose who they want to work with.