mw.addWarning() was added after bug T137900 was fixed. It was intended to be used instead of revisionid, where messages should only be shown in preview mode. This preview functionality is mentioned in the documentation, with the change https://mediawiki.org/wiki/Special:Diff/2386645, and also in comment T137900#2384230.
As can be seen on https://en.wikipedia.org/wiki/German_Air_Force, after Module:Check for unknown parameters was changed to use mw.addWarning, the function does show the warning even when the page is not previewed. mw.addWarning does not work when the warning message which is passed through it contains a div.