In programming, much like in real life, it's important to clean up our toys after we're done playing with them. For example, forgetting to close a connection to a database can waste valuable resources on your database server, and forgetting to close a file might result in data loss, or your operating system refusing to open new files in your program.