The M4 "Sherman" Medium Tank was the most widely produced Allied Tank of WW2 with over 50000 being produced in many variants. It was designed to replace the M3 "Lee/Grant" with which it shared many components but was built with a different Hull & better Armament. The M3's Sponson Mounted Gun was replaced by a Turret Mounted 75mm weapon which could take on the German Mk 3 & 4 Panzers which it would meet in North Africa. Although once Germany started to introduce better Tanks such as the Tiger & Panther it was a totally different story as the Sherman was found wanting in one crucial area - Armour Protection. The 88mm Gun of the Tiger in particular could cut through a Sherman's Armour easily which often resulted in a huge Fire Ball as the fuel ignited and unless the crew bailed out quickly it became a Death Trap. However there were of course more Shermans than the better German Tanks and the Allies enjoyed Air Superiority in most campaigns where the Sherman was used. So it was really weight of numbers and reliability which won the day for the Allies where the Sherman was concerned and also good versatility as it could be adapted to many specialised roles as well. It was still being used by some countries in to the 1980's.
It was the British that baptised the Sherman in battle though, in the lead up to, during and after El Alamein. The British liked the reliability and good Armament that it provided enabling them to take on the Mk 3 & 4 Panzer on equal terms. Although because of it's high silhouette it was easy to spot (Like the M3) and fell prey to Rommel's Gun Lines if it encountered them usually made up of the lethal 88mm Anti-Tank Gun. But the Sherman endured because it could not be easily replaced by a better design as this would have resulted in re-tooling the production line which of course takes time. And the needs for a good reliable Tank outweighed other considerations during War time.