The "encryption" step is what makes EKE a Password Authenticated Key Exchange algorithm; the low entropy shared secret (the password) can be tolerated precisely because of that step.
Note that it is a special encryption; we are not talking about something like AES here. The idea can be roughly expressed in the following terms:
- There is a base, unauthenticated key exchange algorithm, e.g. Diffie-Hellman.
- Both parties encrypt their messages with the shared password as key.
- The "encryption" must be such that it converts each message in what could structurally be another valid message for the base key exchange algorithm.
- Each encryption represents a commitment.
The last point is the most important and yet the trickiest to grasp. When Alice sends her Ep(ga) (her half of DH, encrypted with password p), she commits to the password p. She may complete the DH computation, i.e. find the shared DH secret gab, only if she assumes that Bob also used the same password p. A fake Alice, trying to guess p, may try to change her mind afterwards and think: well, I sent Ep(ga) but maybe Bob was using password p', so Bob computed Dp'(Ep(ga)) and ended up with some group element ga' on which he based his DH computations... and there Alice fails, because she cannot know that value a'. The layer of "encryption with p then decryption with p'" puts Alice outside of the inner DH. The net result is that a transcript of a single protocol exchange between Alice and Bob can serve to test only one password, the password p that Alice used initially. This is what protects the password against offline dictionary attacks.
(Everything about EKE and PAKE is in the paragraph above. Read it again and again until you understand it or your head falls off.)