$f(x)=\frac{sec^2(x)}{tan^2(x)}$
Domain of $sec^2(x)$ and $tan^2(x)$ is $\mathbb{R}-(2n+1)\frac{\pi}{2}$, for $n \in \mathbb{Z}$, hence $f(x)$ also has the same domain. I expected a discontinuity at at $x=\frac{\pi}{2}$.
But, the graph does not say so.
What am I missing in my concept?
Also, even if the software did the manipulation $\frac{sec^2(x)}{tan^2(x)}$=$\frac{1}{sin^2(x)}$ it should have been valid only for $x \in \mathbb{R} -(2n+1)\frac{\pi}{2}$.

$$\frac{\sec^2(x)}{\tan^2(x)} = \frac{1}{\sin^2(x)}$$
for all values of $x$ where $\cos(x) \neq 0$. You are right in the assumption that $f(x) = \frac{\sec^2(x)}{\tan^2(x)}$ should have a discontinuity at $x = \pi/2$. Technically speaking, the function $g(x) = \frac{1}{\sin^2(x)}$ isn't technically the same function as $f$ because, as you said, they have slightly different domains. This is an instance where the computer has graphed the "simplified" function $g(x)$, exemplifying why you cannot always trust computers blindly. Your reservations are correct.