What is the purpose of the imaginary portion of the wave function?

It is misleading to consider the real and imaginary parts of the wave function separately. The wave function is a function of spacetime that returns a complex number. We interpret this as meaning that the wavefunction requires two components to describe it. You can think of this as an amplitude and a phase. However the split between the real and imaginary parts is arbitrary and can be changed by a coordinate transformation, so there is nothing special about about the real part or the imaginary part.

The wavefunction is not an observable, so the fact it is a complex quantity does not matter. Anything we can observe is given by acting on the wavefunction with a Hermitian operator, and these are guaranteed to return a real result.