You need that sleep statement. Without it your main method is done executing and control is go back to TinyCLR which is in the command mode after that.
@ willgeorge - Just to add to what @ Architect has said.
Using Thread.Sleep(-1) is the best approach for keeping your code active in .NETMF. In native code you will often see that they use a infinite loop to keep the application active, but that is a very bad approach in .NETMF.