Do hotels give themselves star ratings?
No, the French government do. They have a series of criteria to obtain 1 to 5 stars (like is there a TV, airco, coffee/tea set, internet, etc etc in the room). The more criteria are met, the higher the score.
The government also employs inspectors who spot check hotels. So you can be reasonably well assured that the hotel star ratings are appropriate.