Mixing has two functions:
Each dough has an optimum mixing time depending on the flour and mixing method used.
It is a balancing act as too much mixing produces a dough that is very extensible with reduced elastic properties
while undermixing may cause small unmixed patches which will remain unrisen in the bread giving a final loaf with a poor appearance inside.