As someone who interviews, I can say that while there is a correlation between CV and coding skills, you do find regularly that really simple coding problems cannot be solved by applicants (slightly above FizzBuzz complexity).
And for most applicants, there is no Github-Account.
So I think its only fair to have some coding problems that don't overdo it of course for permanent positions.
When you are consulting the situation is of course a bit different. The situation is temporary. Getting and verifying references is actually legal and possible. So I can definitely see that you get gigs this way (you'd also get hired without solving a coding challenge because many companies don'T do it actually).
I just personally would feel much safer joining a company as an employee where I can be certain that my colleagues can at least code and have been selected with appropriate care.