It is thoughtless to suddenly switch on a bright electric light over the fish; they turn out to be startled and dart about in an agitated state.
Under the exact same category of petty cruelty is knocking on the glass to make a specific fish come out from behind a piece of rock or vegetation, or carelessly dropping the cover back on the top of the aquarium.
In fairness I don’t believe that any of these things are usually done with the intention of frightening the fish, but that they’re careless and thoughtless actions which can, and should, be avoided.