"and the exchange of a dog": What is "the exchange of a dog"? Saying to one's neighbor: Take this lamb for this dog, (in which instance the lamb may not be dedicated to the Temple). I might think that if he walked it (i.e., the beast given as a harlot's hire) into the azarah (the Temple court), he is liable, it is, therefore written "for the abomination of the L-rd." It is written here "abomination," and elsewhere (relative to the interdict against sacrificing blemished animals) (Ibid. 17:1) "abomination." Just as there, sacrifice (is interdicted), so, here, sacrifice (and not merely entry is interdicted).
Trading a Lamb for a Dog and the Temple Ban
Sifrei Devarim 261:2