Is the typical implementation of low pass filter in C code actually not a typical low pass filter?
The "simplistic" implementation that you referenced above is often called a leaky integrator, a special case of a first-order IIR lowpass filter. They are discussed in more detail in several previous questions:


Is a leaky integrator the same thing as a low pass filter?
Is there a technical term for this simple method of smoothing out a signal?
Designing a practical integrator
&quot;Low-pass filter&quot; in non-EE, software API contexts


To answer your question specifically, yes, it is a lowpass filter. You can certainly construct more complicated filters with a better lowpass frequency response. The main advantages of the leaky integrator construct are its very simple implementation, and the fact that you can adjust its cutoff frequency by simply changing the value of $a$ (as $a \to 0$, the cutoff of the filter decreases).