When deciding whether to Buy or Build - The most obvious reason to lean one way or the other is cost. Other considerations include Time to Market, First mover advantage, and the "polish" of having something designed specifically to your needs, and not bolted up. Affiliate Management Systems, Shopping Carts, Social Features pretty much anything you need can now days be found from third party vendors, and even better some that are open source. But be careful not to fall into the "Penny wise Pound foolish" trap.
I once worked for a company whose founder believed he and his developers code were superior to any others solutions, and that more importantly he could build the functionality cheaper then any off the shelf solution. While he might have been correct about any initial costs, I simply could not convince him that he was dead wrong.
We ended up developing our product in house (this was a consumer software program that we had been white labeling for just a few dollars per copy) and were able to launch the product into beta 9 months latter.
Ultimate cost was not the money (a few thousand a month) he paid his off shore developers for those 9 months...the real cost? Looking back, when the product did finally launch, it started at a 20k per month run rate, and quickly ramped from there to 500k a year. So even if you just factor the first 9 months of missed sales - You're talking hundreds of thousands of dollars in lost sales.
At this same company, it was not just products, it was our infrastructure where he made that same WRONG decision... We built our own affiliate system internally at a cost of one year to get to market. It was just out right wrong to not have used a third party affiliate system even just temporarily ... That was one whole year of affiliate sales opportunities down the drain.