So, it’s not that they were entirely off limits. Only a few laws in the Hebrew Bible outlaw eating the חזיר (pig). (We don’t know why pigs are treyf, only that they’re not clean for eating.)
We do have pig bones that have been recovered from archaeological dig sites in the Central Highlands throughout the Iron Age and into later periods. (See Avraham Faust, Israel’s Ethnogenesis, who cites the presence of pig bones as a marker of site ethnicity.)
Pigs were always in the region (and are of course attested in the New Testament as well—think of the account of the demon Legion that Jesus cast into a herd of pigs and the account of Peter’s vision in Acts 10. Greeks and Romans also eventually settled in the Levant. So, pigs were always available for the kind of thing we think is meant by the “desolating sacrilege” referees to in the latter parts of Daniel and in Maccabees.