There was also a secondary purpose - the Allies' objective was to get a foothold on the continent and set up a bridgehead to invade from the west, this they knew they had to do sooner rather than later as there was a real fear that if and when the Soviet red Army pushed back the Germans that they could capture too much of Europe. Plus it was realised that the only way to take on and beat the Nazis was via an invasion. Militarily the Dieppe raid was partly a test of how the combined navy/army and air forces could combine to attack an entrenched target, and whether it was best to attack a port - which if captured would provide a harbour to reinforce the bridgehead and extricate wounded troops or to go for another target. In the end the decision was made to invade along the coast on the beaches, and the harbour problem was solved by towing prefabricated harbours over and anchoring them off the coast (their remains can still be seen off the coast at Arromanches).
At the time of Dieppe the Allied officers did not have yet the knowledge and combat experience to make a proper assessment of the risks of such an operation and that it was imperative to improve communications at all levels: on the battlefield, between the HQs of each unit, between air, naval and ground forces and to thoroughly bombard the target