The second one can improve Google's bottom line. They don't give a fuck about the ethics of the thing, only what gets them positive press and the increased likelihood that they can hire female developers, which has a number of benefits.