Why then did Fawkes decide to fly not just one person, but all Harry, Ron, Ginny and Prof. Lochart out of the chamber through the pipes, which is presumably riskier?
I think this is a flawed assumption. Quoting from an answer to Why didn't Mr. Weasley use Side-Along Apparition to get to the Quidditch World Cup?:
It's not easy, Apparition, and when it's not done property it can lead to nasty complications...
You don't mess around with Apparition. There are plenty of adult wizards who don't bother with it.
In Deathly Hallows, we see a case where Apparition goes wrong, and nearly kills Ron. Both Side-Along Apparition and Apparition within Hogwarts grounds are the kinds of things we only see people like Dumbledore do. Based on this, I think it's plausible that Fawkes thought flying out was the safer bet, rather than attempting powerful and dangerous magic on a bunch of kids.
Plus, consider the fact that at least half the group doesn't even know about Apparition yet: Harry grew up with Muggles and Lockhart had just erased his own memory. These aren't the kinds of people you want to suddenly try to Apparate with; they could get scared and let go, or distract Fawkes enough to throw off the whole spell. Compare that with what actually happened in the book:
An extraordinary lightness seemed to spread through his whole body and the next second, in a rush of wings, they were flying upward through the pipe...The chill air was whipping through Harry's hair, and before he'd stopped enjoying the ride, it was over...
As you can see, this isn't a desperate struggle for weakened students to cling to a straining bird; instead, it's a quick, easy, and fun end to what had been a pretty terrible day so far.
Which brings up another point, maybe Fawkes just wanted to fly instead of Apparating. Keep in mind he's just recently resurrected, the last time Harry saw him he was like this:
a decrepit-looking bird that resembled a half-plucked turkey...its eyes were dull and, even as Harry watched, a couple more feathers fell out of its tail.
Now that Fawkes is back to full strength, in the prime of his re-youth, it seems likely that he'll enjoy any chance to spread his wings. Plus, he's Dumbledore's pet, so he's got to have a little bit of style.
TL;DR: Apparition is dangerous, especially with people who don't know what it is, and flying everyone out was a simple and fun alternative.