That said, I can also understand why companies avoid ex-cons. Companies make decisions based on statistics. A company will, ceterus paribus, always choose the candidate who has no criminal history because that candidate is less likely to commit a crime and hurt the company.
It's not so simple. A murderer or rapist may have served his term in prison but still not have made restitution to the victim or his or her family. However, it's good for felons to find work after incarceration so that they can support themselves and ideally make amends to victims.
Perhaps some kind of standardized post-incarceration psychological/behavioral evaluation and certification system?
edit: someone mentioned this: https://thelastmile.org/