It always amazes me when cats know when a door, normally closed to them, opens. Here are two of our house cats enjoying the fish swimming around the tank. We specifically placed the fish in a separate room so they wouldn't be bothered by the cats. However, the door to the room was propped open and it took less than ten seconds for the cats to realize that, and find the fish tank.
A cat's natural curiosity can sometimes get them into trouble but in this case, I think it is the fish that might have experienced trouble if the cats had not been removed.