FYI that's an awful "rule" and as far as I know isn't taught anymore because, again, it's terrible. There's more exceptions to it than follow it. Such as "their".
I've seen an expanded version that includes "or when sounding like 'a' like in 'neighbour' and 'weigh'," but that's still far from perfect. For example, leisure doesn't fit either of those. Deceive has it come after a c, doesn't sound like an 'a', and the i still comes after the e. Forfeit is another, and of all the words I've used so far, it produces yet a new sound with the same vowel conbo.
English is just a really whacky language because of its history and influences.