Hogwarts is their home. The kids are (mostly) protected by being told to keep away from the animals.
Many of the creatures in question considered Hogwarts to be their home, just as much as any of the children did.
"What are you doing in our Forest?" bellowed the hard-faced grey centaur Harry and Hermione had seen on their last trip into the Forest. "Why are you here?"
"Your Forest?" said Umbridge, shaking now not only with fright but also, it seemed, with indignation. "I would remind you that you live here only because the Ministry of Magic permits you certain areas of land -"
(Order of the Phoenix, Chapter 33, Fight and Flight).
Professor Umbridge quickly discovers that evicting the centaurs is not as easy as she might imagine.
An arrow flew so close to her head that it caught at her mousy hair in passing: she let out an ear-splitting scream and threw her hands over her head, while some of the centaurs bellowed their approval and others laughed raucously.
[...]
"Whose Forest is it now, human?" bellowed Bane.
(Order of the Phoenix, Chapter 33, Fight and Flight).
Dumbledore always had a much more sensible understanding of the delicate ecosystem that makes up Hogwarts. Umbridge showed during her brief tenure that she didn't understand just how finely poised that Hogwarts ecosystem was - and not just when it comes to the creatures. Dumbledore, unlike Umbridge, understood that you can't just try to force the centaurs or the mermaids or Peeves to leave, nor place draconian requirements on the teachers. This is why Umbridge gets shut out of the headmaster's office (among other things); she doesn't understand the magic of the place.
As my other answer on a related question (Why would Hogwarts be built near a forest full of centaurs?) points out, Hogwarts also functions as a kind of nature reserve for these creatures, who don't have a proper home in the Muggle world.
The grounds of Hogwarts function partly as a nature reserve for magical creatures which have difficulty existing in Muggle-inhabited areas.
(Pottermore, "The Great Lake").
The creatures belong there and don't really have anywhere else to go.
Nevertheless, students were clearly warned to stay away from the most dangerous creatures. Hence there was a blanket ban on the Forbidden Forest.
"First-years should note that the forest in the grounds is forbidden to all pupils."
(Philosopher's Stone, Chapter 7, The Sorting Hat).
This rule prevented the children from coming into contact with the centaurs, the Acromantula, unicorns, Thestrals and any number of other potentially dangerous creatures.
Fluffy was kept in the corridor on the third floor, which was strictly forbidden.
"And finally, I must tell you that this year, the third-floor corridor on the right-hand side is out of bounds to everyone who does not wish to die a very painful death."
(Philosopher's Stone, Chapter 7, The Sorting Hat).
Other dangerous creatures were in Hogwarts during the Triwizard Tournament. Dragons and a sphinx were imported especially whilst competitors also came into contact with mermaids and grindelows which were always in the Great Lake but which they wouldn't ordinarily run into. However, these creatures were only encountered by the oldest and most skilful students after stern warnings and careful vetting.
"Eager though I know all of you will be to bring the Triwizard Cup to Hogwarts," he said, "the Heads of the participating schools, along with the Ministry of Magic, have agreed to impose an age restriction on contenders this year. Only students who are of age - that is to say, seventeen years or older - will be allowed to put forward their names for consideration."
(Goblet of Fire, Chapter 12, The Triwizard Tournament).
There are also the creatures that feature in Care of Magical Creatures and Defence Against the Dark Arts classes. These creatures aren't properly dangerous, however, and the students' interactions with them are always supervised by a teacher. If student injuries were widespread and commonplace then presumably Rita Skeeter wouldn't have had to make up nonsense about Flobberworms when looking for dirt on Hagrid.
"I was attacked by a Hippogriff, and my friend Vincent Crabbe got a bad bite off a Flobberworm," says Draco Malfoy, a fourth-year student.
(Goblet of Fire, Chapter 24, Rita Skeeter's Scoop).
Many of the most fearsome creatures at Hogwarts aren't actually that dangerous. They can even be quite playful.
Harry walked slowly along the deserted corridor, peering out of the windows as he went; he could see people messing around in the air over the Quidditch pitch and a couple of students swimming in the lake, accompanied by the giant squid.
(Order of the Phoenix, Chapter 38, The Second War Begins).
...they wandered down to the lake and flopped under a tree. The Weasley twins and Lee Jordan were tickling the tentacles of a giant squid, which was basking in the warm shallows.
(Philosopher's Stone, Chapter 16, Through the Trapdoor).
The most dangerous creature of all was the Basilisk but Dumbledore didn't know about this so wasn't in much of a position to remove it. He would have done if he'd had that information.
It's only the Dementors which pose a genuine risk to the students, out of the creatures which Dumbledore knew about. Dumbledore took the precaution of forcing them to remain outside the castle grounds. He also warned the students in strong terms about how dangerous they were.
Dumbledore cleared his throat and continued. "As you will be aware after their search of the Hogwarts Express, our school is presently playing host to some of the Dementors of Azkaban, who are here on Ministry of Magic business."
He paused, and Harry remembered what Mr Weasley had said about Dumbledore not being happy with the Dementors guarding the school.
"They are stationed at every entrance to the grounds," Dumbledore continued, "and while they are with us, I must make it plain that nobody is to leave school without permission. Dementors are not to be fooled by tricks or disguises - or even Invisibility Cloaks," he added blandly, and Harry and Ron glanced at each other. "It is not in the nature of a Dementor to understand pleading or excuses. I therefore warn each and every one of you to give them no reason to harm you. I look to the Prefects, and our new Head Boy and Girl, to make sure that no student runs foul of the Dementors."
(Prisoner of Azkaban, Chapter 5, The Dementor).
The Dementors, like the other creatures, are dangerous. However, they are the only ones which attack the children without provocation (when they come to the Quidditch match and when they attack Harry at the end). They were only there because the Ministry insisted on their presence, on the grounds that Sirius Black was more dangerous.
"Rosmerta, m'dear, I don't like them any more than you do," said Fudge uncomfortably. "Necessary precaution...unfortunate, but there you are...they are here to protect you all from something much worse...we all know what Black's capable of..."
(Prisoner of Azkaban, Chapter 10, The Marauder's Map).
So, in short, the really dangerous creatures are kept out of harm's way. Harry only runs into so many of them because he keeps breaking the rules (and, out-of-universe, to generate excitement for the plot).
The children could have been better protected, it's true. But Hogwarts is not really that sort of place. It's the sort of school which, ironically, Uncle Vernon would approve of, where you're exposed to danger and risk and forced (within reason) to fend for yourself. Hogwarts doesn't wrap its children in cotton wool.
Of course, that's not to say that the dangerous nature of Hogwarts has escaped satire...
As for why the Philosopher's Stone was kept in Hogwarts, it's because that was the safest place for it.
Gringotts is the safest place in the world fer anything yeh want ter keep safe - 'cept maybe Hogwarts.
(Philosopher's Stone, Chapter 5, Diagon Alley).
When Dumbledore and Flamel became aware that the Stone's security at Gringotts was compromised they took it to the place they adjudged to be the next-safest place. Since getting into Hogwarts undetected isn't exactly easy they probably thought this was a good place. Also, the school was under the constant watch of Albus Dumbledore, which added significantly to its security. Since the Stone gives immortality, they wouldn't have wanted to take any chances with its protection. Dumbledore would've concluded that any break-ins would take place after nightfall anyway, when the students are safe in their commonrooms and out of the way. So student safety wasn't really affected by having the Philosopher's Stone around. And there were no other 'artefacts' that would cause someone to want to break in after the Stone was destroyed.