There are a lot of reasons to reinvent software. Maybe you don't trust the person who wrote it in the first place. Maybe you wrote it back when you didn't know what you were doing, but this time you'll get it right. Or maybe you didn't know that the solution was built already, right under your nose the whole time.
H. Y.'s colleague, as far as he could tell, fell into that third camp. He had a problem — he needed to read a value from web.config (an XML file that holds common settings for .NET applications, like authentication, authorization, connection strings, etc.) — and skipped past the research phase directly to solution engineering.
Had he not skipped the research phase, he would've discovered that all it takes is using ConfigurationManager.AppSettings["keyname"] to accomplish the exact same thing.
And this didn't stop him from skipping the research phase a second time — a similar function is in the same file a few lines down, except that it covers the connectionStrings section of web.config.