Some modules currently transclude a template whose name depends on parameters received, such as Module:Documentation on enwiki. In these types of cases, the module has to call frame:expandTemplate, but this counts towards Lua's time limit. The change at https://en.wikipedia.org/w/index.php?title=Template:Documentation&diff=605027466&oldid=593265833 was made to work around this behavior. Since there's no time limit on preprocessing text or expanding templates from wikitext, I don't see why there needs to be one from Lua.
See Also: T47684: getExpandedArguments should not count toward the 10-second Lua execution limit