I always took it as revenge for the way Sonny acted as boss when filling in for Vito. Sonny took a short-term, quick gratification approach by killing members of the other Families. That, coupled with the death of Bruno T, made Sonny a justified target for such a gruesome execution.