Just like most designers would rather create their designs from scratch, many developers enjoy writing all their code from scratch. When I first began blogging, even though plenty of blog software existed, I decided that it wouldn't be that tough to write my own blog software. So I did just that, and also began creating blogs for friends using the same software. Of course, once more people began to use my software, more feature requests and other issues arose, and support became a nightmare. So although the initial project was enjoyable at times, it's also been a timesink and a bit counterproductive. The jury's still out on whether writing this blog's backend was a good idea, but during this whole process, I've come up with 5 reasons not to write your own code (and instead, use open source or purchased code).
1) Time Is Money
It is very rare for anyone to develop a piece of software for cheaper than they can utilize an existing piece (if such exists). Before you start any large project, it's always worth spending a couple hours checking out other software, and then estimating how long it would take you to self-develop.
2) Other People Have Written It Better
Both commercial and open source software have the advantage of being inspected and run by many people. Especially in the case of open source software, you have some of the best programmers in the development community behind such projects. (In fact, some of the best development firms hire their programmers from the open source community.) Plus, both open-source and commercial software (that includes source code) usually have more features than you even considered before writing your own software.
3) Learn from Other Programmers
As noted in the previous point, there are some really great programmers out there writing code. If you're used to coding things yourself or are part of a small business, you don't get exposed much to different coding styles. Some of the best education I've gained is from real-world examples by programmers with more experience than I.
4) Expand your Resource Library
In my opnion, resourcefulness is one of the most important qualities a person can have. Especially in a smaller business, I would take an above-average developer who knew how to find anything over a better programmer who insisted on developing everything himself. The more you know about where to "find stuff," the more useful and efficient you can be.
5) Better Exit Strategies
Most people enjoy the comfort and satisfaction of working with their own code. What is often not considered is that the code they write could become forever tied to the programmer. If you use popular software for a shopping cart or a CMS, you can always find someone else to help out if you ever leave the client/business. Or if you ever need to sell a company, the transition can be much easier if you're using some frameworks or open source code that the incoming programmers are familiar with.