Ansible is an open source tool for automating repetitive processes. It is from Ansible to automate IT processes that the required configurations are applied to the systems and to reduce errors through automation. Ansible as configuration as code is an agentless and uses ssh to complete the tasks (i.e. does not require software to be installed on target hosts).
In my opinion, it is not mandatory to use Ansible, and we can do all the things that Ansible can do by ourselves with scripts and ssh, but the main reason for using Ansible can be its simplicity in setting it (it has many modules that we can use instead of the wheel to invent from scratch) and also know Ansible compatibility with different environments.