Back then, they covered more of the isles than now. With human civilization ever expanding, there were only very few areas that were untouched. One of those being the very land that Hogwarts was on. So far removed that there would be very little interaction with muggles, where mages could be safe. Still feel safe, even in these trying times.