Why is the fee only on yellow and black car rides, rather than on all cars? Shouldn't we prefer non-private vehicles on the street instead of ones that will do parking?
Congestion pricing is a toll around Manhattan south of 60th St. Private cars would pay only on entering or exiting, since you can't use a private car to pick up strangers in New York (even Uber and Lyft use black cabs, which have a different license from yellow cabs that only covers pre-arranged rides and not street hails).
Since cabs may not necessarily enter or exit the CBD while doing the trip within it, a fee equivalent to the toll should be charged for an origin in the CBD or a destination in the CBD, with a double fee charged if the trip stays wholly within it.
The purpose of such a fee and toll would be to keep vehicles flowing. Cabs are actually worse than private cars for this, since private cars spend most of their time parked while cabs spend their time between fares driving in circles.
Parking externality is handled separately; there is a tax on parking fees, and the total number of off-street spots has been capped for a while.