It's pretty much entirely a choice scarf move, since there isn't a good 4th move when scarfed. It's an anti-Shedinja move that also takes care of Ludicolo, Toxicroak and a few other things. You're correct that protect is a better option when not scarfed. As long as your team has 1-3 ways to deal with Shedinja, you shouldn't have a need to use hidden power flying on an unscarfed Kyogre. Things that go along with Kyogre that can counter Shedinja include Toxicroak/Hitmontop(sucker punch), Palkia(flamethrower) and Abomasnow(auto-hail).
All of those have their issues though, which is why it's a good idea to have more than one way to deal with Shedinja. Sucker punch can be stalled out by non-attack moves since it only have 8 PP. Flamethrower doesn't really fit with a rain team too well, although it does the required 1hp damage to Shedinja; it goes back to normal power if an enemy Abomasnow comes out, as well, and you'll be able to OHKO it. Abomasnow's autohail is able to kill Shedinja in one turn, regardless of focus sash, but if Abomasnow is already out and they change the weather somehow, he's rendered useless unless you've got something else alive that can switch out with Abomasnow to allow him to reactivate hail.
So yeah, probably went a bit overboard with information, but hope I helped :)