It's a rule. The inversion is required when such expressions begin the sentence. Here are a couple of other examples.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Anonymous"Only when you understand buyers should you begin to create compelling Web content to reach them." Why does the author invert "you should"?Initial "only".