It was originally a common typo when typing OMG you accidently hit the z instead of the shift, resulting in "zOMG". Now often it's just added for style or whatever.
Same thing with pwned. A map maker in WoW typed "this person has been pwned" instead of owned, because the p is directly next to the o (obviously). It quickly spread and now is just added for the fun of it.