Interesting? but why does bash execute the code from standard output instead of simply displaying it to the user?
It's not bash. You can remove the shebang line and cat the file, and it still works. It's simply your terminal interpreting the ANSI codes and displaying the contents of the file.