It was an open bidding process. Apparently the companies with the economy of scale to perform on the level needed do not exist in the US.
We are an agricultural and manufacturing nation, among other industries. Small nations with little land mass seem to have developed strong international shipping expertise.
And remember - reporters are using the word "ports" when they should be using the word "terminals". The widespread impression seems to be that everything that is next to water, and the water of our harbors are being "sold" to Arabs.
When you control the terminals you control goods coming into the country. It can make it easier for terrorist to attack the US in the future. If the alliance with UAE goes bad you might be stuck with a problem.