That is cruelty to the animal and evil.
The fish keeper has zero idea how to keep the fish happy and contented.
When the fish is happy, the fish swims gracefully.
When the fish is stressed, it bangs its head against the wall trying to escape the torture.