Mirrors produce reflections of the observer. In the case of a fish, it reproduces what appears to be another fish of the identical species.
Territorial fish (at the stage in development relevant to this discussion) react to the image as a threat. They then instinctively produce chemicals and behaviors that are intended to frighten the image or to indicate submission based upon millions of years of evolution.
The fish in the mirror displays the identical reactions which confuse, irritate, disturb and leave unresolved the threat the fish experiences since the reflection by definition can't display the appropriate response.. People have examined brain tissues of fish treated this way and found that this causes identifiable physical neural changes in the fish's brain which are associated with a constant high level of threat. Re: Terror.
This isn't good for the fish; it's bad. However, some owners enjoy the spectacle and enjoy whatever other effects they want. Imo, the mirror is a tool to terrorize fish for the sole purpose of the owners amusement. I think of this in the same as letting your kids smack the glass to scare the fish.
Not a fan of treating pets that way.