It depends on several factors (among many others I might fail to mention in this post):
1) Cost
You should check the total price of each component/parts included in the pre-built PC if there would be considerable savings if you buy the components/parts separately. There are instances that getting a pre-built PC would be almost equal to the price of the summation of all parts purchased individually. Most of the times, pre-built PCs costs higher.
2) Confidence and Fulfillment
Purchasing the parts individually and assembling it on your own is one of the PC builders'/users' fullfilment. It depends on your general know-how on parts assembly and priorities. This involves researching every component's specifications/capabilities, identifying your own PC needs, canvassing of most affordable parts, assembling and testing the whole setup.
3) Flexibility
Pre-built PCs are offered as a set (but there are some being sold with optional upgrades). Buying individual parts, you'd have greater flexibility in choosing which parts you like, need, and want.
4) Performance
Due to limitations on pre-built PC, there might be parts included in the set that you don't really need but are forced to buy since it is being sold as a set. That means additional cost to replace such parts you want to upgrade because the specific component does not suit your needs/wants.