Dolphus hides his coke in a bag because he wants people to believe that he is drinking whiskey. This is a bit of a "bait and switch" as Dolphus Raymond says he is offering the people of Maycomb as false excuse for his lifestyle choices.
These choices consist of deciding to associate and socialize with African Americans.
By letting people believe that he is a drunkard, Dolphus is providing an alternate excuse for his behavior outside of his own predilections regarding his company.
It is Dolphus's little joke, but it tells us a little something about him as a man. Atticus would never do something like that. He'd stand up and let everyone see what he was doing and take responsibility for it publicly. Dolphus is not that strong of a person. He would rather hide behind the facade of supposed drunkeness than stand up and be counted.
Dolphus's character serves to underscore Harper Lee's theme of perception vs. reality. Dolphus, a white man, knows that people will be uncomfortable with his choice to marry and have children with a black woman, so he lets them "excuse" his behavior on his supposed drunkenness. He lets them perceive something that will make them more comfortable with his choices because he is fairly sure they would never understand the reality of his choices. He thinks, probably rightly considering the time in history and the attitudes expressed by the white people throughout the town, that white people should have no regard for blacks, much less should they actually fall in love with them.
We don't know if Maycomb has any laws pertaining to public consumption of alcohol; considering that it was during Prohibition, and liquor was illegal, drinking in public would probably have landed Dolphus in jail. As the previous quote mentioned, Dolphus enjoyed people thinking he was staggering around drunk and drinking whiskey from a bottle in a paper sack. It was his way of enjoying a joke on the people who frowned upon him.
Doplhus has several half-breed children, and he wants people to think that he is drunk. He thinks that if people think he's drunk, they will excuse his behavior and he won't have to explain anything to anyone about his Mulatto children.