Just like it was "accidental" when Google's street view cars were capturing wifi data.
Similar here: The developers logged information onto the device itself in one version of the software and didn't hesitate to push a new release.
From an engineering perspective relatively small bugs. Impact a bit larger.
At the point in time when Google pulled that stunt, unprotected networks were still incredibly common. A company like Google playing dumb on that, or actually not knowing that, would be pretty sad.
I can completely see how this sort of thing could happen accidentally - not that it’s a great excuse for sloppy work, but mistakes do happen.