I’m a child of the era. It surprises me Microsoft embraced open source but it also doesn’t surprise me they bought the largest service for it. While git doesn’t have lock-in GitHub actions and the rest totally do.
Azure accounts for something like 35-40% of all their revenue, and those pesky tenants insisted on installing Linux and running things on their other than Exchange or Microsoft Dynamics.
With Microsoft there's always a catch. ( they're are not alone of course ).
They also try to influence the market. To build lock-in. They’ve never stopped doing that.