KTHX is the closing “bookend” for any block except the hai block. This includes loops, conditionals, functions, etc. This is not a “break” style statement.
See also: kthxbye