People answered on "But why is the latter preferable?", but I will answer on
"Why does IntelliJ suggest to replace anonymous Runnables with Lambda
Expressions?"
is that Intellij is checking the project level language
that you've set and tries to suggest the way you should code using that version of the language. You most probably have it set to 8 or above.
In order to change it, go to Project structure
(CTRL
+ALT
+SHIFT
+S
) -> Project
and change the Project level language
to be lower than 8.
Or if you only need it for specific module, go in Project structure
again, and on Modules
, click the module you need and from Sources
tab, there's a Language level
.
Edit: Also, take a look at this thread What is Project Language level in IntelliJ IDEA?