Quark is a civilian running a private establishment. Why shouldn't be be allowed to stay? The Federation may have a socialist economy but it's not a communist dictatorship. Private citizens can own property and do whatever they want.
Why do they let him get away with so many minor offenses? Because they know in the long run he's harmless, because he's a source of information, because he brings people to the station, because his establishment is good for entertaining people.