I'd imagine in three ways: (1) the host country refuses to admit you (2) the host country stamps your passport and you're totally SOL at the border on your way back in, or commit some sort of fraud if they ask you where you went and you don't answer truthfully which brings us to (3) exactly like this haha.
I think this is the norm for some of the more “controversial” countries. I went to Cuba (with permission from the State Department) before Obama eased sanctions and I was quite disappointed that they didn’t stamp my passport. Instead I got a little slip of paper that was about the size of a page in my passport. It was my understanding that the Cuban government had designed the visa system this way on purpose to allow Americans to more easily skirt the sanctions.
And once I got past border patrol and saw all of the items coming out with the luggage (car parts, toilet seats, televisions, a grill, etc.) it was clear that this system allowed the wealthier families to avoid most of the inconveniences of the US embargo.
There host country could just admit you and not stamp your passport. I've been on several cruises and had to go out of my way to get my passport stamps. Honestly they seemed annoyed I even wanted the stamp.
Yeah the Israelis are known for doing this as many middle-eastern countries refuse to admit foreigners with Israeli stamps in their passports. If you ask, they'll stamp a slip of paper instead.