The First Amendment states that the People are permitted the freedom to exercise a religion of their choosing and bars Congress from ESTABLISHING a religion. This was in response to the English monarchy’s relationship with the Church of England and its use as a religious bully pulpit.
There’s nothing in the BoR that prohibits a religiously-based business from barring non-Christians from their employ. Likewise, there’s nothing prohibiting a jailor from disallowing a bad grooming practice.
Our entire government system is infected.
The ruling was not based on the First Amendment. It was based on a federal statute which prohibits prisons receiving federal aid from infringing on inmate's religious freedom unless absolutely necessary to protect the security of the prison. Hence the 9-0 decision, written by Alito.