You can develop apps all you want, but Apple can break them anytime with updates. iOS and macOS are marketed and positioned by Apple differently. One is an open platform, one isn't. This is and should continue to be at Apple's sole discretion. If they choose to update macOS to be a closed platform, they certainly have the right to do so, don't they?
Actually, starting out closed and going more open is legal, whereas starting open and going completely closed would get slapped for anticompetitive. (No, requiring "notarization" does not cross the line for becoming closed and anticompetitive.)