Interestingly, it's how Pokemon Go detects whether or not you're trying to 'cheat' the game, and flat-out refuses to run the game if you're in either a rooted OS or are running anything non-vanilla (I lost access to the game after they decided to block cyanogenmod in the same update).
Yeah, so it depends on the way they detect it. You can bypass anything, even Google SafetyNet with stock ROM + magisk + systemless Xposed + phh su and using Magisk Hide if you're determined enough.
CM ships pre-rooted - you just enable it in the settings, but the su binary is present and can be detected by any app looking for it. So that's a very common way to detect it on CM.
It seems things have shifted again since I last checked and now magisk has its own builtin su, magiskhide is greatly improved and many people are using suhide instead altogether.