What is the Advantage of Commands in API

Hi,

I see a lot of threads of users wanting to do toolbar commands and other

functions in Solidworks using API command strings.

With me being ignorant to this kind of programming, what is the advantage

of executing commands using API when a lot of them are button commands?

I just want to learn more so that is why I am asking.

Thanks

SolidworksApi macros