The original idea of the tank was for infantry support, not tank vs. tank battles. For awhile, there were tank destroyers (which looked much like tanks), whose mission was destruction of enemy tanks. I believe the 75mm was superseded later in WWII by the 76mm, which was somewhat more powerful and effective against enemy armor.
There was not much uniformity in opinion how tanks should be used at the start of WWII.
The US had the M3 Stuart on the basis that tanks would act as scouting units, much like cavalry in the past (thus the name "Stuart". The lightly armed and armored M3 Stuart was however essentially useless as were many European tank modeled on the same principle. The above mentioned M3 medium tank was also intended for offensive operations.
Rommel made his reputation in France when he advanced far faster than anticipated by the German high command - at times having to stop as he outstripped his supply lines and supporting infantry.
Obviously the armored commands in the US paid attrition to that. For example FM-100-5 published in May 1941 stated:
"The armored division is organized primarily to perform missions that require great mobility and firepower. It is given decisive missions. It is capable of engaging in all forms of combat, but its primary role is in offensive operations against hostile rear areas."
They clearly did not envision the tank as an infantry support vehicle as was the case in WWI. However, they also did not see the role as being one of tank on tank battle as FM-17-33 published in September 1942 only devoted about 4 of its 140 or so pages to tank on tank combat.
In both the US and the German armies it was recognized that the majority of tank killing would be done by easily portable anti-tank guns and both armies fielded them in large numbers.
The Germans recognized the different roles for the tank and fielded two types of tanks to address both the infantry support role and the concept of exploiting a breech in the line by putting fast moving tanks in the enemy rear areas, something that could often turn a strategic withdrawal or re-adjustment of a defensive line into a rout.
The types of "tanks" were further refined by the Germans in the course of the war in two divergent directions. First with heavy assault guns, which were comparatively slow moving but heavily armored and armed with large bore low velocity cannon designed to throw a heavy HE shell. As the war progressed, they also developed tank destroyers that were generally low profile, heavily armored vehicles with hull mounted large caliber high velocity guns like the 75 KwK 40 or the 88mm anti-aircraft gun.
These tank destroyers were optimized for point defense from hull down positions with overlapping fields of fire for mutual defense, and in general were much more survivable than towed anti-tank guns.
By about 1943 there were also less expensive and quick to produce self propelled guns that were built around the 75mm Kwk 40 or the 88mm anti-aircraft gun. These were employed as tank destroyers but they were generally high profile vehicles and lacked sufficient armor and most designs had no overhead protection so their crews were very vulnerable to air burst artillery fire.
The Germans were also very good at re-purposing the chassis and hulls on their out dated tanks and rebuilding them for the tanks destroyer and self propelled anti tank gun roles.
WWII was really the first large scale application of armor and combined arms tactics and a lot of false starts were made. However by the end of the war, pretty much everyone learned that tanks needed to have adequate support from ground troops to reduce their vulnerability to enemy troops with short range anti-tank weapons.
The lesson was also learned that tanks were extremely vulnerable to enemy aircraft and armor was almost useless in a large scale operation if you did not possess at least local air superiority.
The Germans suffered that fate in 1944-45, however they learned that lesson dishing it out to the French in 1940. The French not only had more tanks than the Germans, they on average had better armed and armored tanks than the Germans. What the French lacked was the ability to move them up into combat as German airpower and their almost total air superiority massively disrupted French transportation and communications between the HQs in the rear and the troops in the front line.
----
In 1942 the 75 mm M3 was capable of penetrating the armor on the Panzer IIIs and IVs it faced out to at least 1000 meters, and no need for a larger gun was envisioned - in part due to the philosophy that the AT gun would be the main tank killer, and partly to the (partly) mistaken belief that the Panzer V and Panzer VI would not be produced in great numbers. It also was a failure to predict the up gunning on the later Panzer IV variants with the 754mm KwK 40 along with the increased numbers of tank =destroyers like the StuG III and Marder III which carrie the same very effective high velocity gun.
That was an unfortunate over sight as the US could have started putting the 76mm and 90mm antitank guns in the M4 in 1942. Even in 1943 it was felt that there was no need for a larger gun for the M4 in the invasion of Europe and it was felt that disrupting production in preparation for D-day was not worth the benefits. The same reasoning was used to delay production of the M26 Pershing with a very effective 90mm gun and much improved armor protection. The end result was a lot of dead US tank crews who were massively outgunned, and it wasn't until late 1944 that decently armed and up armored M4 variants started to arrive.
Even then the 76mm M2A1 gun with the M62 round was not sufficient. it gave the M4 parity with the latest Panzer IVs, but it would not penetrate the glacis plate on a Panther tank at anything beyond point blank range, so the 76mm M4s and to hit them in the side of the hull or in the turret. Against a Tiger I, the M1A2 gun was effective in penetrating the Tiger's frontal armor at about 400-500 yards - but the Tiger's 88mm gun could punch a hole in the frontal armor of an 76mm armed M4A2 Sherman at 2,000 yards.
The main flaw with the M1A2 76mm gun was that the 76mm Anti-tank gun with it's 57 caliber length barrel unbalanced the M4's turret, so they shorted the barrel to 52 calibers on the M1A2, reducing performance by a very critical 10%.
The British were a lot quicker in reading the tea leaves and adapted their 76.2mm 17 pounder to the M4 Sherman. It still could not penetrate the 55 degree sloped glacis plate on the Panther but it could penetrate the turret out to well over 2500 yards and it could penetrate the frontal armor on a Tiger I at 1,900 yards giving it near parity with the Tiger I. The major flaw with the 17 pounder as mounted in the M4 was that it wasn't particularly accurate and at 1500 meters it only had about a 25% probability of hitting the turret on a Panther tank.