Seagulls live near the sea because their main food is fish. When bird evolution exploded after the dinosaurs had died out, they quickly (in geological terms) adapted to fill all the ecological niches made available by the previous extinction event and one of those was the sea.