Well it was a spy plane. Maybe the mission was to search for submarines.
Those planes generally are sub hunters.
P8s DO search for Subs...so there is that.