John yesterday went to the store to buy eggs.
John went to the store yesterday to buy eggs.
John went to the store to buy eggs yesterday.
I suggest the reason we usually position adverbial yesterday at the beginning or end of OP's example sentence (whereas we'd put an adverb like willingly immediately before or after the relevant verb went) is because it modifies the entire sentence.
See this earlier ELU answer about the difference between "sentence" and a "manner" adverbs. But at the end of the day it's largely down to individual stylistic choices.