because the people who lived in the land before you did all these detestable things, and the land became defiled.
In context
25The land became defiled, and I brought punishment on it for its iniquity, and the land vomited out its inhabitants. 26But you are to keep my statutes and my regulations, and you must not do any of these detestable things — neither the native-born nor the foreigner living among you — 27because the people who lived in the land before you did all these detestable things, and the land became defiled. 28If you defile the land, it will vomit you out as it vomited out the nation that was there before you. 29For everyone who does any of these detestable things — those who do them are to be cut off from among their people.