The transform type "htmlhelp" is used to create HTML Help control files. If the build runs on a system that has the HTML Help compiler installed, the control files will be compiled into a CHM file.
The dita.htmlhelp.convertlang is a post-processor for the content to ensure that it can be processed correctly by the compiler, and that the appropriate codepages and languages are used.
Finally, compile.HTML.Help attempts to detect the HTML Help compiler; if found, it compiles the full project into a single CHM file.