They ARE defending their country. The purpose of the militar is not, and never has been, to patrol the border. You are utterly ridiculous.
You're right. The purpose of the military is not to patrol the border. The purpose of the military is to defend America. And America is more directly threatened by what is coming and can come across her border than by militias and killing squads in Iraq.