The Model-View-Controller (MVC) pattern is a way to organise your code that separates it into three parts: models, controllers, and views It allows you to separate the code that does stuff from the code that shows stuff.
Organising your code according to the MVC pattern allows you to separate concerns: keep application code separate from presentation code.
Another big advantage is for the developers working on your project. Designers can focus on the front end without worrying about the business logic. The developers of the models can focus on the business logic or back end without worrying about the look and feel. For example, if you want to change the look and feel, you don’t have to change anything to do with the database; and vice versa.
Learn more by writing your own PHP MVC framework from scratch, my latest online Udemy course.