The primary reason the stroke orders are what they are is that in Japanese, lots of characters are optimised for writing efficiency and/or cursive script. While they seem illogical at first, if you follow these stroke orders, you will eventually start writing more efficiently with less tired hands for longer pieces of writing (while simultaneously maintaining legibility).
This is「生」written in one or two strokes, which can only be achieved if you follow the hand motions of the Japanese stroke order.
This is「金」written in three or four strokes. Again, it follows the hand motions of the stroke order that you're taught.
「全」is no exception!
The secondary reason is that if you don't follow these stroke orders, you risk getting marked wrong in your tests.
All images from cidianwang.com and jisho.org.