This statement is actually a negative statement. It means "even though I got some benefit from doing it, in the end I did not get what I wanted."; or, "it may seem to you that I got what I wanted, but I did not.". It is usually a reply to someone else's positive observation about something that happened.
"Hey Allen, I hear that you finally got to the front of the ticket line." Allen replies, "Yea, for all the good it did (for) me, I ended up with a seat behind a column and couldn't see anything." The "for" is typically understood and not said.
Quite often, it is said without the explanatory statement but in a tone that indicates that the person is not happy. "Hey Nozturk, I hear Allen answered your question." Nozturk replies in a negative tone "Sure he did, for all the good it did."