How does this "simple filter" work?
In more standard DSP terms, you have the following filter:

$$
y[n] = (1-a) x[n] + a y[n-1]
$$

where $x[n]$ and $y[n]$ are the input and output signals at time $n$ respectively.

The transfer function (which you didn't ask for) is:

$$
H(z) = \frac{1-a}{1 - az^{-1}}
$$

so here is your single pole, at $z=a$ in the complex plane. This filter is also known as exponential smoothing, exponential moving average (EMA), or exponentially weighted moving average (EWMA).

The infinite impulse response is $h[n] = (1-a) u[n] a^n$. In layman terms, when the input signal is 0 except for $x[0]=1$, the output signal is an exponential $(1-a) \times a^n$ starting at $n=0$.

What you want is the step response (i.e. what happens if the input signal is a constant $K$ starting at time $n=0$).

In this case, the output signal is the convolution $h \star Ku$ of the impulse response and the step signal. This is (for time $n \ge 0$):

$$
y[n] = \sum_{k=0}^{k=n} K \times h[k] = K(1-a) \sum_{k=0}^{k=n} a^k
= K(1-a)\frac{1-a^{n+1}}{1-a}
= K (1-a^{n+1})
$$

As the time $n$ grows, $a^{n+1}$ vanishes, and the step response grows monotonically to its limit value $y = K$, which is the value of the input signal.

This is what you get in your simulation.