I notice in Exodus 10 that these seemingly random plagues are actually designed to communicate that the LORD is executing judgment on the false gods of the Egyptians.
The Egyptian sorcerers are able to call on their false gods initially when Moses turned his staff into a snake.
They could call on their false gods to do that and to match the first two plagues.