But lossy-codecs job is to utilize psychovisual tricks to discard as much high-frequency information as possible, whilst remaining similar visual effects. If you increase the brightness in RAW and then re-encode the JPEG - more noise is being pulled up in the visual spectrum, therefor less of that information (filesize) is discarded.
For example, if you render Gaussian noise in photopea and export as JPEG 100% quality, it has 9.2MB. If you reduce the exposure by -2 it goes down to 7.8MB. That's partially because more parts of the noise are effectively black pixels, but also I believe because of the earlier mentioned effect.