Dear student whether its pi or pi- theta or theta , wheatever it may be , its an angle and sine of any angle is equal to the ratio of the length of side opposite to the angle (pi-theta here) to the hypotenuse.
Sine is opp / hypotenuse
Sin (pi-theta) = cos theta
But Its opp / hypotenuse for the angle pi- theta and its adjacent/ hypotenuse for the angle theta
pi- theta and theta are different values of angles