Ever since the beginning of the Transformers franchise in 1984, the basis for the majority of stories is the war for Cybertron. Originally a classic tale of good versus evil it has evolved with the times to become a war about resources, power differences, and many others. Regardless of the reasons for the war, the two characters at the center make the war as interesting and engaging as it is.
Source:https://www.cbr.com/transformers-optimus-prime-megatron-importance/