Why all enzyme work well in their own optimum temperature and optimum pH ?

i need more explanation about why different enzyme have different optimum temperature and different optimum pH to react. i hope to get a long explanation for my essay that contain 5 marks.