AFAIK a lot are there to protect trading ship routes that have been attacked by rebels or so.
Some were probably helping with the makeshift port they wanted to use to supply trapped starving Palestinians.
Dunno who authorized it, but it's also not important, because those ships are cruising around in international waters anyway. They minimize the time docked in ports for strategic reasons. They also get authorization from that nation when entering territorial waters, except if they are in a hostile situation with that nation, of course.