It is, therefore, written (Ibid. 34:20) "And the firstling of an ass, etc." It is the firstling of an ass that you redeem and you do not redeem the firstling of any other unclean beast. What, then, is the intent of (Numbers 18:15) "but redeem shall you redeem, etc."? If it cannot apply to redeeming an unclean beast, understand it as indicating that one may dedicate an unclean beast to the department for Temple maintenance and redeem it thence.
This Is Called Bedek Habayit, the Department Responsible for Temple
Mekhilta Tractate Pischa 18:15