Japanese characters are composed of strokes and each character is intended to be written in a certain order.
It is very important to learn the correct stroke order as this will help you intuitively know how to write new characters and it has a big effect on how readable it ends up looking.
This is because the glyph (shape) of the handwritten form is different from the printed (typed) form. Example: き (ki).
Similarly, this also is the case for Kanji. Example: 冷 (Cool).
Why? Well, this is no different to the English language where some characters are written differently than they are typed or printed.