Well, one reason I know this happens is to emphasize the word you are reading. There will be cases, in some manga, where you will see — for example: まじで!(really, seriously) as マジで!
The example above creates an emphasis, it's like reading something in caps.
As shown in the pic.
Bonus:
The small っ at the end of the expression is also a sort of emphasis, but in this case, it's as if you were emphasizing last sound as a hard-stop. Say the word, out loud & calmly, "stop." Now say it with a little anger and a hard-stop at the letter "p," "stop!"
Make sense? 頑張ってっ!