Do recruitment agencies, or headhunters, offer anything of value to
job seekers?
Yes.
They offer the discovery of potential jobs that you otherwise may not be able to find on your own. Sometimes, they are not publicly listed jobs. Other times they are jobs which are not yet listed.
And they often offer access, particularly if they have a long relationship with their client companies.
Good ones can offer you insight into the hiring company, their culture, their payscales, the hiring manager, etc.
You get to decide how much value you personally place on what they are offering. You may have a sufficiently strong network such that you don't need their services. In that case, their incremental value might be low.
In the past, I've used an agency as both a candidate and as a hiring manager. I got to know one particular agent, who specialized in my field, over time. I trusted him on both sides of the equation. He didn't always find me the job I ultimately chose (sometimes I found one on my own), but I never had any reason not to trust whatever he told me.
So basically when they post a job offer it doesn't mean that the job
position is real.
That may be true in some cases (perhaps your friend is a headhunter and that's the way his company does business), but it is certainly not true in all cases. In my experience in my locale it is not true in the vast majority of cases. Perhaps your locale is different.
Your original title was: "Is it true we shouldn't trust recruitment
agencies?"
I think it would be foolish to choose not to trust any recruitment agencies at all.