I wouldn't trust Apple with anything open source, but Apple's not trying to look like an open-source-friendly company. Microsoft is.
Apple has never tried to look like an open-source-friendly company, but has never really been actively opposed to it either. Their whole business model, for a long time now, has been to sell overpriced iDevices to users. Anything that supports that goal is OK by them. More recently, they've been making money with online services: Apple Music, Apple+ streaming TV, etc., but these aren't really affected by FOSS.
Microsoft is different from both of these. Their business model for ages was to sell packaged (or preloaded) proprietary software to end-users, and to control the OS that all users used. They've moved more into the cloud services realm in recent years, but they're still pushing Windows and Office. They were actively hostile to FOSS for many years: "Linux is cancer", "pacman-like", etc. Don't forget the Halloween documents. They've been trying to project a nicer, friendlier-to-FOSS image in recent years, but a tiger can't change its stripes.
How are people so naive to think that a colossal corporation with a capitalization comparable to the GDP of Germany is spending an enormous amount of resources to build "a free" code editor, and that they are doing so with absolutely the best and benevolent intentions?