The Autobots in my view were used as a contrast that when stood next to humans it revealed the human arrogance and selfishness.
A higher form of intelligence was protecting them and recognizing the value of their life even though humans are weak to control their impulses, arrogant despite how petty they were next to higher intelligent forms, naive as to not listen to the warnings of the Autobots, disrespectful as to not appreciate the help they were getting, stupid for causing pain to each other and not valuing life of others, whereas the Autobots would go as far as to fight for what was right and virtuous even though humans did not seem to deserve it.
The decepticons were just like the humans. Selfish, egotistical, arrogant and just like humans they did not care about other beings when survival was priority much like humans. They justified their actions just as we justify our violent actions towards other beings and human groups since we consider our selves the highest intelligent form on this planet, that by any means our survival and prosperity should be above anyone else's and that we are the "good" group while others are the bad unintelligent ones. But when this justification is used by another more intelligent form than us like the decepticons and we are what has to be destroyed for that intelligent form's survival and prosperity, we dont like it. So it was a way to put us in the shoes of the other beings and other humans that we are oppressing and at the same time make us observe our unfair actions reflected in the Decepticons.
The Autobots were the beings that we should have ideally been and try to achieve connection and balance with every other sentient being rather than force ourselves against them. Autobots respected and valued life regardless of intelligence and power. Decepticons did not. And we humans dont either.