I was responding to a comment about a hypothetical, not this particular case. The hypothetical was a company with $4b in debt selling $5b in stock to remain operating. This is not only fine, it is common, especially for private companies where investors are betting on the future success of a company.
Even in bankruptcy, it is not uncommon for investors or banks to give the company bridge loans which the lenders knows full well might be lost if the restructuring doesn't work.
As for this case, it is not robbing shareholders. Chapter 11 is in not an automatic wipe out for shareholders, in fact you'll see other comments here about proposals for alternate plans for Hertz that would not wipe out shareholders. This is, if not common, certainly not unheard of: Restructuring a public corp and keeping it public post chapter 11 means it will still have stock on the market, and in some cases prior shareholders are able to exchanged their old shares for new ones.
It is also not robbing because even retail investors know full well what "bankruptcy" means and no reasonable person would buy this stock without realizing the significant risk for total loss. And in any case, how would Hertz selling stock, knowing the likely risk for a complete loss, be any different than some other institutional investor selling their stock, also knowing the buyer has an excellent chance for a complete loss?