wiring a ceiling light fitting
Because wires are not color-coded for installer benefit.   The wires are red and black, because manufactured cable is red and black. Actually the wires have a variety of functions.  

The wires from supply are "always-hot" (red) and "neutral" (black). 

The wires to the switch are "always-hot" (black) and "switched-hot" (red).  The switch will short out these two wires, that is its job, so connecting it to always-hot and neutral will always blow the fuse. 

The wires to the lamp are "switched-hot" (red) and "neutral" (black). 

The purposes don't match the colors.  I solve that with colored tape; say mark the switched-hot wires brown and the always-hots red. I always mark wires the same at both ends.  Once you color-code everything, then you match color to color.  It's the only way I work.  But you do you.