of course it's on a discriminatory bases. A lawyer can simply be a racist if they want to, or sexist. Lawyers aren't public accomodationsRead the law again. A lawyer can pick and choose his clients but not on a discriminatory basis. And under the 6th amendment require lawyers to take clients they would normally refuse.
The 6th Amendment makes no such requirement. A lawyer can refuse whoever they want.