In most Motown songs you have two guitar parts that play very specific roles in the groove. They were mainly done like that because of restrictions in the gear they used back then. One of the main issues was that music was often heard on radios with little or no bass. So therefore they added a guitar part that either doubled the bass line or played something that sounded like a bass line in case you couldn't hear the actual bass. "My Girl" is a perfect example of this.