What is central to comparing lightning with an object repeatedly opening and closing?

Purposes, Classifications, and Rhetorical Degrees of Simile