I read a report earlier that the government of Somalia was warned in advance of the raid.
Just like the plot of a Vince Flynn novel with super star Mitch Rapp. I believe “Executive Power”.
A weak (and traitorous) Secretary of State (ala Kerry) did not wish to offend the foreign leader and invade his sovereignty so he told that country, which in turn told the bad guys who were paying them off. Seals met hot lead on the beach