a) free bug fixes
b) it's a form of brand awareness advertisement targeted at developers, in the context of talent acquisition
c) some developers that work at these companies legitimately want to foster a community around some technical subject
d) for many of these developers it's a multi-purpose avenue of expression, e.g. working on interesting things, displaying technical prowess for potential employers, developing/sharpening skills, etc
e) in some companies, outwards impact is considered a criteria for promotions