In the early days, pillars didn't exist in Salt. Grains were originally introduced as a mechanism for minions to gather system information. That data was useful to execution modules, and it wasn't long before custom grains were also introduced.
The problem with grains is that they need to be configured directly on minions. While the
grains execution module does allow easy remote editing of those files, it is often easier and more appropriate to configure data for those minions in a centralized location, such as the master.
As you know, pillars are normally stored in the
/srv/pillar/ directory on the master, in static YAML files. However, those files don't need to be static.