Non-linearity is needed otherwise the input energy would just make the state go to higher and higher energy levels, e.g. from 1 to 2. But we only want to use levels 0 and 1.
The way this is modelled in by starting from a pure LC circuit, which is an harmonic oscillator, see also quantum LC circuit, and then replacing the linear inductor with a SQUID device, e.g. mentioned at: youtu.be/eZJjQGu85Ps?t=1655 Video 9. "Superconducting Qubits I Part 1 by Zlatko Minev (2020)".