According to our knowledge, there is no scriptural text that forbids castrating animals so that they do not reproduce. All the scriptural texts about castration are only related to humans, and it is never right to compare animals with humans. Therefore, based on that, the origin of this matter is permissibility.