Most commutes are not between major cities, they are within metro regions, so the size of the US doesn’t explain the terrible infrastructure. Besides, for decades now, most of Europe has no political impediments to travel, same as the US. People can commute from Berlin to Madrid as if it were one country. Density matters, but not the size of the country.
As for density, there are many US regions that are of similar density and distance apart as European cities, such as DC-NY-Boston, or Portland-Seattle-Vancouver, SF-LA, etc.