He is trustworthy to Harry and Dumbledore. Plus, he is very friendly to students. The question is actually simple, considering the fact that Dumbledore is an old friend of Horace's.
Because he chose not to, mostly out of fear.
He didn't want to die. Quite understandable, given the circumstances. He expressed similar concerns about joining Hogwarts when offered a teaching position:
Still... the prudent wizard keeps his head down in such times. All very well for Dumbledore to talk, but taking up a post at Hogwarts just now would be tantamount to declaring my public allegiance to the Order of the Phoenix! And while I'm sure they're very admirable and brave and all the rest of it, I don't personally fancy the mortality rate.
Harry Potter and the Half-Blood Prince, Chapter 4 - Horace Slughorn, Page 60
He was as disinclined to join the Order as he was the Death Eaters.
As for the mortality rate in question, by the end of the second wizarding war, 17 out of the 39 members of the Order of the Phoenix were dead, with an extra 2 being rendered insane. Only 7 of the original members of the First Order survived.
Because your question is based on a false understanding of Horace Slughorn.
He isn't at all "friendly to students". He's friendly to people who he thinks will advance his long-term interests. He has no interest whatsoever in them as students, nor even as people. They are merely pawns to be used for his own benefit.
Harry certainly doesn't consider Slughorn a friend. The book is quite clear that Harry and Hermione both think he is a complete creep. It isn't going too far to compare his methods with child abuse grooming. Other students are flattered by getting attention and preferential treatment from an authority figure, of course - and that's how grooming works.
Dumbledore is unfailingly polite to everyone, however mad they happen to be. He's not rude to anyone at any of the trials we see him attending, nor to Voldemort, nor even to the group of Deatheaters who
finally come to kill him.
So how Dumbledore treats someone has no bearing on what he actually thinks of them. He doesn't even trust Harry with the truth of what his actual gameplan is - a gameplan, you'll remember, which requires
Harry to witness his murder in order to make both Voldemort and the Order think Snape is on the other side, without telling Harry that he is already dying anyway and that sacrificing himself this way serves a strategic purpose.
As well as placing the children under his care in a great deal of personal danger all the way through the series, of course. Dumbledore is clearly just as much prone as Slughorn to using people as pawns. The difference is that he's working for the greater good rather than for himself, but the morality side of it is definitely shady. Even Harry recognises this, when he's on the run and realising that Dumbledore actually has put him in a great deal of danger without giving him the skills he needs to survive.