It's allowed for consular officers. Because they are given great discretion to reject people with high potential of overstay or dangerous to USA out of US soil.
Once the foreigner is admitted into US land. This kind of thing will not affect petitioners inside the USA and filing with USCIS.
Once the foreigner is admitted into US land. This kind of thing will not affect petitioners inside the USA and filing with USCIS.