If I have to buy 2 things at the shop, I might walk there.
If I have to buy 10 things, I might walk there and take a bag with me.
If I have to buy 200 items...I'll probably drive my car.
Hence the *size* of a task, often determines *how* I will carry out that task.
The database is the same. It records information on the size of tables so it can best work out how to run queries. This information is called "statistics" and hence we "gather" those statistics using the DBMS_STATS package.
There's a whole section in the documentation about how it works and why you need stats
https://docs.oracle.com/database/121/TGSQL/tgsql_optcncpt.htm#TGSQL192