We have a $4$ by $5$ grid with $A$ in the lower left corner, and $B$ in the middle of the left lane. Why can't you draw a line from $A$ to $B$ which goes through all the spots in the grid?

This question is inspired from a question on the now completed Georg Mohr test 2015 in Denmark, which asked something which required finding a path giving the largest amount of points by some criteria. While solving it I came across this question, which I could not answer myself.
Suppose you color the squares black and white, with a chessboard pattern. Note that, when you draw a line between two adjacent squares, one of those squares is black and the other is white. Also note that A and B are of the same color.
Drawing a line through 20 squares means that the starting color and the ending color are different. But since A and B are the same color, this cannot happen.