Honest question: where do you learn advanced stuff if not in a graduate school? Academia undoubtedly sucks if one mainly takes money or career prospects into account. But among people who do challenging and sexy stuff (including in the industry) phd seems to be the norm, not the exception. One might object that phd has become unnecessary because nowadays all the relevant information is online but learning without the help of a community and a mentor is hard.