Where did the angle convention (in mathematics) come from?
One would imagine that a clockwise direction would be more 'natural' (given sundials & the like, also a magnetic compass dial).
Also, given time and direction conventions, one would imagine that the zero degree line would be vertical.
There are two parts to this question: (1) Why do we measure angles anticlockwise? (2) Why do we take the zero degree line to be along the $x$-axis.
(This was inspired by https://matheducators.stackexchange.com/questions/9874/why-do-we-conventionally-treat-trig-functions-as-going-anti-clockwise-from-the-r.)
We measure the angles with the $x$-axis. So one of the arm of the angle is $x$-axis and the other arm is also on $x$-axis if the angle is zero. This is why we take zero degree line along the $x$-axis.
In rectangular coordinate system we have four quadrants. Now we move the second arm which is fixed to the origin. When we move the second arm in counter clockwise direction then we have pattern of going from quadrant I-II-III-IV.
In history mathematicians worked on height and distance problems in which they were required to find height of a tower(say) without directly measuring it. In those problems they required to find the angle between the line of sight(seeing the highest point on the tower) and the surface of Earth. This means we go counter clockwise for measuring the angle.
Today we have coordinate transformation so we can always define everything in new coordinate system according to are convenience.
In my class text book of mathematics while doing trigonometry I found this problem and I searched for the solution. Above thing is what I got while searching for the solution.