>Not once has it ever changed on me.

I don't know how did you achieve it, but I was doing it countless times.

Open with -> other -> enable all applications -> always open with.

For a short while it works, but somehow, something always reverts it back to xcode. Maybe it is restart. Maybe it is little evil cron job discreetly changes it back to xcode, but I was never able to get rid of it. It is happening to me on many different machines since Sierra. One calm day I casually double-click an STL or JSON and it prompts me to install some xcode packages, and I get angry at the machine.