For an Apple\Google owned ecosystem it is. If leaving the walled garden is a button click away, what app would be Apple or Google exclusive? Suddenly an iPhone Owner's favorite apps are on the other platform too, so when upgrade time rolls around why buy an iPhone (and vice versa for Android)?
Commoditizing your own product is never in a company's best interest so don't expect it to happen willingly.
In fact, they don't even have to do that much for Swift. They don't have to develop neither the language nor the compiler.
They need to do similar to what The Browser Company did, exposing and allowing usage of their APIs from Swift, and maintain it as their API evolves.
If The Browser Company could afford it, while developing the browser, Google and Microsoft can afford it as well.