In the U.S., "Q" has been universally used for transistors and "U" for ICs while I notice that it tends to "TR" and "IC" respectively in other countries. Large corporations and the U.S. military have nearly always used "Q" and "U".
Tektronix uses "D" for diodes, "CR" for rectifiers, "VR" for zener diodes and "DS" for LEDs or incandescent lamps. Little of this nomenclature is set in concrete as to any kind of standardization. In fact, it's barely set in Jell-O! Some companies use "I" for incandescent lamps and "D" for any diode or rectifier. "B" or "BT" may be a battery. "J" may be a jack and "P" a plug; and then there's "SO" for socket and "PL" for plug. "S" or "SW" can be a switch. "T" or "TR" for transformer.
As to their derivation, I couldn't tell you. Oftentimes, certain letters are used because other letters are already "taken up". So in equations, capacitance is "C", current is "I" and inductance is "L". Go figure!
Dean