Today's ancient Unix trivia: in the Research Unix V6 shell, 'goto' and 'exit' were both external programs. They worked by changing the seek position on the file descriptor of the shell script (which they shared with the shell). This worked because the shell read its input line by line (which actually meant character by character).
Interested parties can read more on the V6 shell's control flow at https://utcc.utoronto.ca/~cks/space/blog/unix/V6ShellControlFlow