More than mainstream, it's the majority view among philosophers (59% Compatibilists, the rest even split among 3 other possibilities): https://philpapers.org/surveys/results.pl
I wonder if it is mainstream because it is functional rather than because it mirrors reality. The ability to ascribe a moral weight to a choice and then punish or reward an individual for that choice, resolves issues such as nudging people toward "appropriate" behaviour, enacting some vengeance against people who do harm to others, etc. It appears to me to be a neat legal fiction but, perhaps, not the most effective tool.
First, I think it's important to distinguish justice from moral responsibility. Punishment and rehabilitation are about justice. Free will is about identifying who is morally responsible. So accepting free will doesn't automatically mean you can punish wrongdoers.
Second, I'm not sure what you mean by "mirrors reality". The debate surrounding free will is about defining the term and its properties and how it's a factor in moral responsibility. To do so, it must provide a justifiable framework for moral reasoning and our moral language to make sense of how we use the term. Compatibilism convincingly meets the necessary criteria, and that's why it's the majority view.
The holdouts are people who insist free will must have certain properties that Compatibilism probably doesn't have, but they haven't been able to argue this convincingly enough to persuade a majority.