It doesn't just detect arrhythmia -- it also detects if you have fallen and are not moving (and will automatically call emergency services after some duration, if configured as such). More details at https://support.apple.com/en-us/HT208944 if you're interested to know more.