Definetly a glitch.
+4 0 SpA Alakazam Psychic vs. 252 HP / 0 SpD Azumarill: 453-534 (112.1 - 132.1%) -- guaranteed OHKO
Even when Alakazam has 0 SpA EVs, it OHKOs.
ofc it's possible for a +4 to not OHKO an Azumarill, but only if it's something like this:
+4 0 SpA Alakazam Psychic vs. 252 HP / 252 SpD Assault Vest Azumarill: 205-243 (50.7 - 60.1%) -- guaranteed 2HKO
A. That Alakazam has 0IVs and 0EVs on SpA and an Adamant Nature (-SpA +Att), which I doubt Is what your opponent had.
B. Azumarill has 252 SpD EVs and a Calm nature and was holding an Assault Vest, you said your Azu had 0 SpD EVs (which also means you probably didnt have the AV and the Calm nature.)