Let’s face it, sea gulls can be pests, especially when they claim squatters’ rights on empty or little-used structures. Nobody knows for sure how the birds know that a structure is vacated, but common sense indicates that the birds can perceive prolonged inactivity where there should be some and the absence of humans yelling and throwing things at them when the squat.
Even though they have webbed feet, the Gulls seem to prefer angled resting places where they don’t have to sit in their own mess while taking in the sun. See these Herring Gulls on the roof of the barn attached to the above house.
(Brooklin, Maine; images taken March 20, 2021)