In the modern world just walking outside (especially in the summer) presents some pretty significant tznius issues. Presumably you’re allowed to go to the grocery store. Why are we allowed to (much of the time) put ourselves in a position which end up seeing things we shouldn’t be? And if we say you can’t seek out “ervah” but if you end up seeing it it’s not your problem, then how far do we extend that, could you go to a packed beach?
R. Moshe Feinstein in Iggerot Moshe Even HaEzer I 56 rules that one may walk outside, even though he will see inappropriate sights, if he’s doing so for his livelihood or other needs. He even extends this to going to the sea for medical reasons, if there are no other options. (This all applies if one believes that it is likely that he will not have improper thoughts; if one is unsure if that is the case, R. Moshe is hesitant to rule that it is permitted.)