Port or airport, it doesn't matter. Would a dirty bomb exploded at a gate close the gate or the entire airport? Now insert this scenario into your rosy port scenario.
Aha! So lets forbid any foreign airliney from landing at a US Airport, or any foreign shipping line from bringing a ship into a Port Terminal. And lets also forbid any foreign trucker from crossing our border. And don't forget those pesky foreign railroads too that have the hubris to interchange cars of Mexican and Canadian goods into the US.
That'll show 'em!
It must matter, else you and the rest would be whining about airliners from Arab and Muslim countries flying over our cities and landing and taking off from our airports. After all, a dirty bomb might explode.
In heading off a dirty bomb attack, the Dubai/ports issue is a gnat in a hurricane compared to our unguarded southern border.
Your point illustrates perfectly that you don't understand this.
Control of the terminals just means that you control the unloading of stuff at that terminal. You don't control what enters the port in the first place, because its obviously been loaded overseas.
So now this ship with a nuke hidden on board comes steaming into New York Harbor, and detonates. That's your scenario, right?
At that point, does who is unloading the ships even matter? At all?