God allowed the little horn (Antiochus IV Epiphanes) to prosper because of the sins of His people. They had succumbed to the pressure and terror tactics that Antiochus Epiphanes instituted with the gymansium built just outside the temple in Jerusalem, which was to instill Greek idolatry over that of the true religion of God under the law of Moses.
Benson Commentary at Dan. 8:12,
"Daniel 8:12. And a host was given him against the daily sacrifice by reason of transgression — Antiochus prospered so far in his attempts against the Jews and their religion, that he built a citadel in the city of David, and placed a garrison of soldiers there, to disturb those that should come to worship God at the temple: see 1Ma 1:33-36. This God permitted, as a just punishment for the sins of the people, and particularly of those who professed a willingness to forsake the worship of God, and to join with the heathen in their idolatry, 1Ma 1:11; 2Ma 4:13-17. Some translate the words, And a set time was appointed against the daily sacrifice; for the word צבא, rendered host, signifies likewise a set time: see Daniel 10:1. And it cast down the truth to the ground, and prospered — The book of the law, or the divine ordinances delivered to the Jews by Moses, is here called the truth. He prospered so far in his attempts against the true religion, as to suppress it for a time, and hinder the open profession of it: see Daniel 8:24, and Daniel 11:28-32. We read, 1Ma 1:56, that Antiochus ordered the copies of the law to be cut in pieces and burned." Source: Biblehub
Also excerpt from Barnes' Notes:
"By reason of transgression - - בפשׁע beppâsha‛. That is, all this was on account of the transgression of the people, or on account of abounding iniquity. God gave up the people, and their temple, and their sacrifices, into the hands of Antiochus, on account of the prevailing impiety. Compare 1 Macc. 1:11-16. The author of that book traces all these calamities to the acts of certain wicked men, who obtained permission of Antiochus to introduce pagan customs into Jerusalem, and who actually established many of those customs there." Source: Ibid.
The transgression was on the part of the Holy people of Jerusalem.