'Fail' in this context mostly means 'choose to use resources to do other things'. Alphabet has certainly learned a huge amount from all of these ventures, and that doesn't go away if they close them down. There'll be people at Alphabet looking for uses of what came out of these companies in the future. The point of Google X was to try projects that had very little chance of success but that would have been world-changing if they pulled it off. The probability of 'fail always' was always quite high.
The same lesson applies to everyone. Your startup might fail but you take the learning and experience with you, and use it to do other things in the future. When you're setting goals there should be a reasonably high probability of failing because otherwise you're just not aiming high enough.