The purpose of a charge controller is to protect the expensive asset (battery section) in a Solar system; though you can connect a Solar Panel output directly to the battery but that will cost in two ways – loss of energy harvesting & early replacement of battery part.

Technically speaking, every kind of battery, because of its internal structure and characteristics, specifies some precise sum of voltage and current while being charged (or discharged) – there are design limits. A Solar Panel is a unidirectional source of energy which generates and supply DC electric power at its given voltage and current rating while battery is a bidirectional energy device which can accept and deliver energy. An intermediate device is required to manage the transfer of energy from one source (Solar Panel here) to the other source (the battery) in order to protect the design limits of battery (or battery bank) and ensure energy transfer efficiency.