The Cab Rank rule requires a barrister to accept instructions from a client if they have the requisite expertise and availability. The expression ‘Cab Rank’ draws on the analogy of a hackney cab driver who will accept the first passenger in the queue.
The origins of the rule are not entirely clear (see - CB history at p 6), even though it is commonly associated with the following quote from Lord Erskine in 1792:
“From the moment that any advocate can be permitted to say that he will, or will not, stand between the Crown and the subject arraigned in the court where he daily sits to practise, from that moment the liberties of England are at an end. If the advocate refuses to defend, from what he may think of the charge or of the defence, he assumes the character of the Judge:......"
The Cab Rank rule prevents a barrister, inter alia, from refusing instructions from a client due to any personal dislike of them or their political beliefs.
It is a pragmatic rule that has developed by convention due to its effectiveness in ensuring that there is access to justice. The Cab Rank rule does not claim to be based on abstract philosophical claims in the way that human rights laws are.
By contrast the justification for the Equality Act 2010 would be based on abstract political and philosophical arguments; it is of the same genus as a number of other anti-discrimination and human rights legislation. When examined closely the philosophical justifications for such legislation do not make sense or stand up to scrutiny, see HERE. The Equality Act has produced the nonsensical and oxymoronic notion of ‘indirect discrimination’, see HERE.
The Equality Act would not prevent a service provider from refusing to assist a client due to their political beliefs, unless such beliefs constituted philosophical beliefs Further, even if they did constitute philosophical beliefs, the service provider can refuse to provide the service if the belief is not worthy of respect in a democratic society.
The highly subjective question of whether a belief is worthy of respect in a democratic society, ultimately has to be decided by a Court or Tribunal.
In following ARTICLE ON CAB RANK RULE the author, who is a barrister, suggests that the Cab Rank Rule should only apply when the client’s liberty would be at stake. I am unsure whether his summary of the history of the cab rank rule is correct, but even if it is, I would submit that the expansion of the cab rank rule beyond cases where liberty is at stake, has been a logical and natural progression, ensuring that parties can receive access to justice without being at the mercy of the subjective moral judgements of barristers.
The author of the above article implies that in cases where liberty is not at stake, barristers can make decisions based on ‘social justice’ and equality. The article was written in the context of the notional refusal of a number of barristers to apply the cab rank rule because of alleged anthropogenic global warming, which became a high-profile matter.
The somewhat hubristic thinking by barristers who believe they should be able to disapply the cab rank rule due to what they consider to be more profound notions of justice, is a microcosm of human rights legislators who make grand philosophical declarations about human rights and turn such declarations into laws that supplant what has actually worked in practice for long periods of time or in some instances, since time immemorial.
As Edmund Burke observed about the British Constitution and the art of governance:
“The science of government being, therefore, so practical in itself, and intended for such practical purposes, a matter which requires experience, and even more experience than any person can gain in his whole life, however sagacious and observing he may be, it is with infinite caution that any man ought to venture upon pulling down an edifice which has answered in any tolerable degree for ages the common purposes of society..” 
The cab rank rule is an example of a practice that has stood the test of time and is in effect, the result of the combined wisdom of many generations of lawyers. If the cab rank rule can be disapplied based on vague notions of social justice and equality, why should other common practices that have arisen largely by convention, such as client confidentiality, be safe from the arrogance of barristers who believe that there are circumstances where departures from such practices can be justified due to fashionable notions of some putative higher good?