Deuteronomy 23:10

23:10 If there is someone among you who is impure because of some nocturnal emission, he must leave the camp; he may not reenter it immediately.

Deuteronomy 23:14

23:14 For the Lord your God walks about in the middle of your camp to deliver you and defeat your enemies for you. Therefore your camp should be holy, so that he does not see anything indecent among you and turn away from you.