Usually, again this is just in my experience, it's typically tied to a single service that makes up a larger system. So they might have some data in MySQL that has an API fronting it that is managed by one team. Then they have another service that uses SQL Server fronted by another API and managed by a different team. Both of those APIs are used by something larger.
Sometimes it's because a long time ago the service was done by a whole different set of people and now some other group has inherited it and just doesn't want to port it to something else even though everything else they use is open source. These are typically the groups who go to the Azure SQL PaaS service because they don't want to manage something that they don't really care for.
There is a ton of fragmentation out there :)