When we first hear about Andrey Semyonovitch, we think he's a bad guy. Marmeladov tells Raskolnikov that he beat Katerina because she wouldn't have sex with him, to pay him back for the money she owed him. There are also insinuations that he takes advantage of Sonia.
His denial of these rumors is convincing. We don't doubt that Katerina attacked him and he hurt her in defending himself. We don't doubt his sincerity and good will toward Sonia. Of course, the fact that he saves her from Luzhin's accusations of theft helps a lot.
Andrey Semyonovitch also serves as a mouthpiece for some of the "progressive" and "utilitarian" ideas in circulation in Russia in the 1860s, including those found in N.G. Chernyshevsky's What Is To Be Done?