I know about the creeping barrage tactic used in WW1 and how it's used to cover an advance. My question is why didn't they just bombard the enemy so they would be unable to defend their positions while crossing no man's land, and instead using such a risky tactic.
why didn't they just bombard the enemy so they would be unable to defend their positions while crossing no man's land
The problem with bombarding only the enemy trench lines is that it does nothing to suppress outposts in front of the trench lines, in No Man's Land, or between the enemy trench lines. If you extend the barrage to cover this ground, then you have the classic creeping barrage.
Note that when the creeping barrage was used in the Battle of the Somme, the depth of the barrage was 400 yards (typically shifting 100 yards further every 3 minutes). This covered, from the beginning, the first enemy trenches (which were up to about 350 yards away from the British lines), and kept them under bombardment for up to 12 minutes. A creeping barrage was not a thin curtain of fire, but a bombardment with sufficient depth to cover the enemy trenches - at least the first line thereof - from the beginning of the bombardment.
Both of these versions of moving barrages - bombarding only the enemy trench lines and moving the fire from the 1st line to the 2nd line when the infantry should be reaching the first line, and the classic creeping barrage - could suffer from the same problem: moving too quickly, and the infantry not being able to keep up. In both cases, the artillery was firing on a pre-determined timetable. Delays could occur due to the ground being too churned up by a preparatory bombardment with HE, or wire being left too intact by the preparatory bombardment, or enemy resistance. In the first case, with outposts unsuppressed by bombardment, a delay due to resistance was more likely.
For more on the creeping barrage and its development and use by the British, see