You have to remember that at the beginning of WW2, many leaders still thought of tanks as just infantry support vehicles. Tank vs tank fighting was thought to be a rare occurrence, and tanks where looked upon more like armored calvery to fight infantry and fortified emplacements with. Smaller, short barrelled, lower velocity guns were the go to tank armament because of that philosophy.