"As it was" introduces a description of the real situation (he did see Dudley's lips move), as contrasted with the hypothetical situation mentioned in the previous sentence.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.