I don't think MS wants to discourage developing apps using web technologies. They support a number of ways [1,2,3] to turn HTML/JS apps into windows {,store} apps. They've been supportive of using web technologies to make apps before electron existed. The original "modern" app platform for Windows 8 had APIs for C#, C++/CX, and JS. I don't think the first JS push was an effort to improve portability, but portability is definitely a part of "new MS" strategy. Look at things like Xamarin and the Objective-C compiler for visual studio (whatever they're calling it). They don't care if your app isn't Windows exclusive, they're just begging you to put it in the Windows Store.
[1]: https://developer.microsoft.com/en-us/windows/develop/winjs [2]: https://www.microsoft.com/developerblog/real-life-code/2016/... [3]: https://developer.microsoft.com/en-us/windows/bridges/hosted...