Keeping a dog or coming in contact of a Dog is a taboo in Islam. So, the passengers were possibly using that as a trick to keep Muslim cab drivers disinterested in selling them a ride. It may not be illegal if the cab drivers had stated beforehand about their preference of not serving customers with dogs.
Many Muslim jurists consider dogs to be ritually unclean. (najis)[29] However, "jurists from the Sunni Maliki School disagree with the idea that dogs are unclean."[30] Individual fatāwā ("rulings") have indicated that dogs be treated kindly or otherwise released[31] and earlier Islamic literature often portrayed dogs as symbols of highly esteemed virtues such as self-sacrifice and loyalty, which, in the hands of despotic and unjust rulers, become oppressive instruments.[29]
Abou El Fadl "found it hard to believe that the same God who created such companionable creatures would have his prophet declare them 'unclean', stating that animosity towards dogs "reflected views far more consistent with pre-Islamic Arab customs and attitudes".[32] Furthermore, "he found that a hadith from one of the most trustworthy sources tells how the Prophet himself had prayed in the presence of his playfully cavorting dogs.
It's not that it's a taboo, it's the fact they break the persons Wudo (abulution to gain ritual purity). What this means practically is you would need to change your clothes and perform abulution if you wanted to pray; which you do, five times a day. Now day to day working life, this can be difficult, finding a toilet/mosque etc. So it's easier to stay clear of dogs. Muslims don't hate dogs per se (obviously there will be culture bias), or any other animal. We are told to respect all living beings including trees. -- Source - I'm a muslim, though there's probably a lot i've missed, and not an expert.