All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
What your friend said is a clear fallacy by which he wants to justify to himself the forbidden work that he does. In fact, a taxi driver taking a man while knowing that he will go to a bar to consume alcohol [or all kinds of intoxicants] or a woman while knowing that she will go to someone to commit Zina (fornication/adultery) with her, then all this is forbidden as it is a direct cause of committing sin and a direct aiding in it. Indeed, such matters are forbidden by the Sharee’ah as in the Hadeeth in which the Prophet said: “Allaah has cursed wine, its presser, the one who demands it to be pressed, its drinker, its carrier, the one to whom it is conveyed, its server, its seller, its buyer, the one who consumes its price, its purchaser and the one for whom it is purchased.” [At-Tirmithi and Ibn Maajah]
These are reasons that lead to consuming alcohol and a clear help to the one who wants to consume it; it is for this reason that those who do any of what is mentioned in the above Hadeeth are cursed. For more benefit, please refer to Fataawa 116436 and 90289.
As regards the one who sells lawful food for dissolute people, or he who does a lawful job for them, then his work is lawful and his salary is lawful as he did not cause their sin or help them in it.
For more benefit, please refer to Fataawa 90518, 81686 and 86405.
Allaah Knows best.