At level 50, 31 IVs account for 15.5 stat points, which is then rounded down to 15. But if you then add 4 EVs to a stat, which is 1 point at level 100 and .5 stat points at level 50, you round out the number to 16. So, at level 50, if you have 31 IVs in defense and special defense, you only need 4 EVs to increase those stats by 1 point, because you're only a fraction of a stat away from increasing as a result of your IVs adding a decimal number of stat points. Whereas the 8 HP EVs lost are equal to 2 whole hp points at level 100, and 1 HP point at level 50. So you lose 1 HP to gain 1 Defense AND 1 Special Defense. This only works if you have flawless IVs, and if you're at level 50 (not optimized for lvl100 battles). And you only gain 1 higher stat total than before, so it's not a big disadvantage if you don't do it.