@Bim ******
I wouldn't say it's "not legal". Some agencies have an agreement with certain immigration offices and can do things that others can't. There is a lot of corruption in Thailand and that's how things work. Not all immigration offices will deal with these agencies, which is why specific ones are selected.
In Cambodia and Vietnam, most agencies would by your definition not be legal, since they all bribe immigration to get visas extended but that's the system there. Almost no one goes to get their extension done themselves, since immigration there generally won't approve one without the agent doing it on behalf of the applicant. In the vast majority of cases applicants have little to worry about.
Back in Thailand, you have law firms that do things by the book and can't help if your documents aren't in order. Some charge a hefty sum. Others are agents that charge just a few thousand Baht to do the legwork for you at your local immigration office.
The days of illegal stamps, which are totally fake are mostly over. They tend to pre-date the computerization of immigration records.
It would be insane for anyone these days to use a service (if one exists) which issues fake stamps, since at the first encounter with immigration, whether it's for 90 day reporting, to seek an extension or when departing the country, they would be caught, arrested, deported and blacklisted.