The mail goes FROM the International Mail office of Italy. Most likely the Rome Airport.
It goes by commercial plane to one of the Airports in USA with an International mail Office. Most likely to JFK.
It can go to one of the others depending what flights have some room for mail.
IT DOES NOT just go anywhere.
International agreements over 100 years old designate where each country exchanges mail.
There are currently nine IMF International Mail Facility locations across the U.S., with one location in Florida, Hawaii, Illinois, New Jersey, New York, Puerto Rico, U.S. Virgin Islands respectively and two locations in California.
Mail shares the space with the luggage on the planes. One reason it can take a while to cross the ocean. Each plane has a limit to how much mail it will take.
It might go to Miami it is just that JFK has more daily flights from Rome.
Italian Post Office is just responsible to get it to the USA CUSTOMS facility.. After US Customs does their inspection it is then up to USPS to get it the rest of the way.
The path can change at any time. Computers monitor and direct each bag of mail onto the next available routing. For example when the Airport is closed for a storm like the recent hurricane not much point directing mail there for a few days.
The worlds post offices have been doing this for a very long time and do communicate with each other regularly as to where the mail will go. Sometimes it is just held at the faraway place until the receiving place has The ability to deal with it.
The next storm could be a blizzard that closes NY JFK. Obviously that day the mail would just go to Miami.