Fact-Checking this Viral Bottle Trick

I have a theory why collapse bubble produce light. Light come form thermal radiation. When cavitation bubble form, it evaporate some water. When bubble collapse, vapor bubble shrink, when it shrink it's temperature go skyrocket to several thousand degrees Celsius, that enough for thermal radiation to peak at visible wavelength. Flash can only only when the bubble has enough energy, bigger bubble tend to more likely to produce flash. Energy can be gained form kinetic energy of anything else in there and it's heat.