They are not equal. What gave you the impression that they were?
I believe that you meant to ask 'how does
Look at the graph of tan(x):
Tan - Wolfram|Alpha
It repeats itself every radians. Do you understand why this is the case?