I will say one time I modded a creature and had an error with their legs in the body tokens where they were always flashing the - wounded icon. Those did breed in cages. Got annoying after a while because their babies would spawn out of the cages. Stuff them in and they just kept breeding.
Unless this kept happening for multiple years, they probably go pregnant beforehand. If a male and female are free for even a second - even when on opposite sides of the map - the female can become pregnant. This has lead to the common joke that everything reproduces by spores in DF.
Also of note: if you had an owned version of that animal (as in, a pet with a dwarven owner) or had some other reason for frequently adding more creatures into the cage, that too could cause that. An animal can be pregnant for quite some time before giving birth, and that is the main reason wild animals don't reproduce much.
I just had a thought: Using mechanisms, you could probably make a large pit that automatically lets out a small portion of the animals within for a hunter to hunt in safety. It would certainly keep them from rushing out and getting themselves killed in ambushes due to the lack of wild animals outside the pit.