Why is the output of stateful elements often named Q?
Alan Turing used the letter q to denote states in what came to be known as Turing machines. Presumably the q stood for quanta, emphasizing a state's discrete rather than continuous nature. This happened in the 30s when quantum theory was permeating the scientific æther.
So a quick trip through the USPTO database is revealing.
This is only a partial answer, and the answer will be much harder to find, simply from observing the differences in what is DOCUMENTED you see a lot disparity in usage. i.e the terminology is not uniformly applied.
I traced back through Integrated semiconductor solutions to discreet and even tube systems.
Hughes pat # 2903606 issued '59, Filed in '55 discusses a JK FF using the J,K and Q, /Q notation.
Computer research corp. pat # 2644887 issued '53 filed in '50 speaks to FF's, and uses A,B,C input terminology for the logic. But does NOT use Q and /Q designing counters. Column 13 lines 1 and 2 talks to a "1" and a "0" for logical states.
Monroe calculating machine pat #2603746 issued '52, filed '50 uses tubes and the terminology of a & b as inputs and implements 1bit adder and subtractor. Using carry etc. Column 8 lines 56 ff talks to again logic levels as "1' and "0"
There were lots of later ones in IC's etc. but these are early and implemented using discreet components. It is very clear that the terminology predates IC's.
It is also very clear that the terminology is inconsistently used across inventions.
The "1" and "0" notation almost certainly comes from earlier work, I would conjecture the work of Boole might reference that.
attached is a list of patents I looked at, if someone else wants to look at them and follow the threads into even earlier ones. I only followed one thread through this.
Not a definitive answer, but the first flipflops had two inputs, to Set and Reset them respectively; another early type had a single Toggle input. That conveniently allocated the letters R,S,T for input signals, so I guess the choice was between Q and U for the output!