Ctrl-C stops the program because the TTY driver watches for it and sends an interrupt signal when it appears. It's a slightly different mechanism.
There are more details in "man 3 termios", but be warned, the TTY layer is not a pleasant subject for reading.