Why do we have $\hbar$ in the commutation relation? Let's think of the Planck constant as of the slope of the electromagnetic field dispersion relation, $E=\hbar \omega$. Planck constant is not independent of the electron charge, both can be rescaled as long as the fine structure constant remains unchanged. Still, it's oftentimes convenient to use both.
As we start learning QM, way before getting to QED, we are taught that the Planck constant appears as a multiple of $i$ in the canonical quantization relation. Why??
Don't get me wrong, I'm totally OK with the fact that it appears in the studies of the oscillator. It could simply be a dimensionful quantity in terms of which other quantities having the same units are expressed.
But we are typically being told smth very different. In the spirit of "this number $\hbar$ in $[q,p]=i\hbar$ is the Planck constant whose value is..., and it sets the scale at which physics starts being quantum".
Imagine a world without QED, with strongly interacting quarks and gluons only. What number would they put into the commutation relation when teaching undergrads?
 A: This question illustrates one of the fundamental challenges in teaching physics. We need to learn easier things first, because we're human, but that's in direct conflict with the desire to learn things in a sequence that is logically clear (deepest axioms first, and forevermore derive everything else from those).
We learn $E=\hbar\omega$ for photons first, because it's easier. Then we learn non-relativistic QM, and then we learn QED. But the reason for the appearance of the same constant $\hbar$ in both $E=\hbar\omega$ (for photons) and in $[q,p]=i\hbar$ non-relativistic QM (which doesn't have photons) comes from QED!
For this particular case, here's a possible solution: after students learn that $E=\hbar\omega$ for photons, point out that this is a special case of a relation that works for particles of all mass, not just massless ones. In particular, the same relation holds for massive particles in non-relativistic QM. Now, after introducing some basics about non-relativistic QM, we can announce that the factor of $\hbar$ really comes from the commutation relations, and then we can show them how to derive the realtion $E=\hbar\omega$ from that deeper reason (for massive particles).
By the time students are ready to learn non-relativistic QM, they should already be familiar with the generic fact that the easier-things-first sequence is often different than the logically-clear sequence, so they should be open to re-arranging their view about where Planck's constant "comes from" when they learn non-relativistic QM. And once the students see how the factor of $\hbar$ in $E=\hbar\omega$ arises from the commutation relations in non-relativistic QM, they should be open to the idea that something similar might be true more generally, so they should be open to a statement like this:

Later, when you learn about relativistic QED, you'll see that the relation $E=\hbar\omega$ for photons gets its factor of $\hbar$ from the same source: commutation relations.

This isn't a perfect solution, because the students might assume that "commutation relations" means "between the position observable and the momentum observable," which is untrue in QED. That problem also has an easy solution, though, one that is strangely missing from the standard curriculum: After teaching non-relativistic QM and before teaching QED, teach non-relativistic QFT! Non-relativistic QFT a great pedagogical bridge for many reasons, and this is one of those reasons. Using non-relativistic QFT, where the math is easy, we can show students how the position-momentum commutation relation arises from the field-field commutation relation. From there, learning why we can't construct a strict position operator in the relativistic case — and why we can still get $E=\hbar\omega$ directly from the field-field commutation relation — should be a relatively easy conceptual step.
A: This does not depend specifically on QED, but is a consequence of the general property of quantum mechanics that momentum is the Fourier conjugate of position, or alternatively from the solution of the Schrodinger equation. In natural units the Fourier transform contains the term $e^{ix\cdot p}$. It follows that the natural units of momentum are 1/[length], and likewise the natural units of energy are 1/[time]. Just as relativity shows that the natural units of distance are the same as the unit of time ($c=1$), quantum mechanics shows that the natural units of energy are $\mathrm s^-1$. In other words, $\hbar$ is simply a conversion constant between natural units and energy (or mass). This is reflected in the current SI definition of the kilogram, in terms of Planck's constant.
