In Rabbi Kaspi’s commentary on Deuteronomy 21:1, he refers to ‘the teacher’ as having already given a reason for the commandment. Who is this teacher and where did s/he give their reason? Thanks.
Moreh (or hamoreh, harav hamoreh, etc.) is usually a reference to Rambam, after his book Moreh Nevuchim. R. Yosef Ibn Kaspi frequently cites Rambam in his works. In this case we can indeed see that Rambam provides the reason for this commandment in Moreh Nevuchim 3:40 where he writes:
The beneficial character of the law concerning "the breaking of the neck of a heifer" (Deut. xii. 1-8) is evident. For it is the city that is nearest to the slain person that brings the heifer, and in most cases the murderer comes from that place. The elders of the place call upon God as their witness, according to the interpretation of our Sages, that they have always kept the roads in good condition, have protected them, and have directed every one that asked his way; that the person has not been killed because they were careless in these general provisions, and they do not know who has slain him. As a rule the investigation, the procession of the elders, the measuring, and the taking of the heifer, make people talk about it, and by making the event public, the murderer may be found out, and he who knows of him, or has heard of him, or has discovered him by any due, will now name the person that is the murderer, and as soon as a man, or even a woman or handmaid, rises up and names a certain person as having committed the murder, the heifer is not killed. It is well known that it is considered great wickedness and guilt on the part of a person who knows the murderer, and is silent about him whilst the elders call upon God as witness that they know nothing about the murderer. Even a woman will, therefore, communicate whatever knowledge she has of him. When the murderer is discovered, the benefit of the law is apparent. If the court of justice cannot sentence him to death, the king may find him guilty, who has the power to sentence to death on circumstantial evidence; and if the ling does not put him to death, the avenger of blood may scheme and plan his death, and at last kill him. We have thus shown the use of the law concerning the breaking of the neck of the heifer in discovering the murderer. Force is added to the law by the rule that the place in which the neck of the heifer is broken should never be cultivated or sown. The owner of the land will therefore use all means in his power to search and to find the murderer, in order that the heifer be not killed and his land be not made useless to him.