I don't know if it was "shot themselves in the foot" so much as "the unsustainable thing they were doing to prevent potential competition finally broke."
FAANG's talent acquisition strategy has always been as much about preventing things from being built externally as it was building things internally. Problem is, there's only so long you can funnel all of your 500k/year engineers into revenue-negative wastes of time like Stadia, Alexa or Diem. In this case, the profitable units like cloud and ads can no longer subsidize those units made primarily to employ people in a way that prevents them from working on legitimate competitors to their actual, profitable business units.