If you look at turrets from ships before the invention of the tank all featured some degree of sloping, with some having completely rounded turrets. Why was this not applied to tanks, for example the the PzKpfw III, IV and VI.
It was applied to tanks. The fact that sloping an armoured plate helped it deflect bullets better was known long before WWII. If you look at the French Renault FT tank, you see exactly what you just described: a rounded conical turret. The Americans tested their armour piercing bullets against 0 degree and 30 degree plates in the interbellum period, the Soviets were aware of the need to slope armour in 1930, before their domestic tank program really even took off. It wasn't really some kind of big secret even before tanks with highly sloped armour like the FCM-36 and T-34 were put into production.
Even the tanks you mention have some amount of sloping, just not as drastically pronounced. The issue is the layout of the tank. The PzI set the classic German front transmission/rear engine trend, and wrapping that kind of tank in armour resulted in a no nonsense boxy look to optimize the size of the tank for what you had inside. You can see this with the PzII and PzIV as well, the armour of the tank bends around internal components (PzII engine deck, PzIV hull gunner position) rather than continue in straight lines in a way that would be easier to produce.
Sources:
A Review of the V50 Ballistic Limit Requirement of MIL-A-46100, DTIC A274927