I understand why JetBlue's IATA code isn't JB since that belongs to a pre-existing helijet service in Canada, but why is it B6?
Is there some history behind the B6 moniker?
I don't know, but ...
If you look at the IATA application form you will see there is nowhere for the airline to indicate the code it would like to receive.
I imagine many new airlines might indicate a preference in an accompanying letter (e.g. they would like a code starting with a specific letter)
If you look at the allocated codes you can see that, initially, some attempt was made by IATA to make the two-character codes mnemonic
AA = American Airlines BA = British Airways etc
However if JB was already allocated, it is reasonable that the IATA staff would look for an available code starting with either J or B. Since the Blue of JetBlue is more distinguishing than the Jet part of the name, the IATA employee may have started with B and noticed that the following were already allocated
B1 Bravo Passenger Solution Pte., Ltd. B2 Belavia B3 Bhutan Airlines dba Tashi Air Pvt L B4 ZanAir Limited B5 East African Safari Air Express Ltd.
(note I have not checked dates these codes were allocated but the hypothesis seems plausible to me)
The last two are puzzling but perhaps they changed their names (perhaps as part of a takeover, merger or split). Airline codes do get reused. For example, B5 was used by FlightLine before it went out of business.
Then B6 would be the next available code.