The same thought applies to mice and other little mammals like sugar fliers, reptiles and amphibians, etc. I’ve cats and dogs that I adore, so I’m not anti-pet exactly, but if you take a step back and really look, the whole idea of pets is…not right.
partly i have moved past the black and white moralization of it, into something that's more of a heuristic of minimization in order to guide me through the more grey parts of life. pets is a really really hard one for me, because i share your intuition, it's not kind to restrict their freedom, but i also enjoy that bond with them.
ultimately, i don't have a reason more than it's just one of the places in my life that brings me a lot of joy. my family and i can't have kids or a dog or anything, but i love having animals around. the bird feeders are another daily enjoyment of mine. the fish are really beautiful and i take the best care of them i can. there are very few of them in a quite large tank, but yes i also get a weird sad feeling while watching them pretty frequently...
thanks for asking though, it's a good thing to continually re-evaluate. i don't know if it's something that i can indulge in long term.
I eat meat so I'm not claiming any moral ground, on the contrary I very much keep in high esteem people who avoid animal products, but the idea of keeping a living creature in a tiny living space feels incredibly sad to me, and it seems surprising that someone like you would do it.