Why aren't roll up summary fields allowed for Lookup Relationships?
Roll-Up Summary even though looks like a config for us, its very very CPU and resource intensive for Salesforce. Whenever a child record changes SF has to update the parent after running big sum of complex calculations.
In Database terminology, Lookups are just Foreign Keys to refer the primary key of the other table. That's it, no extra feature. Most of the times we just wanna refer other tables, here Lookup suits that very well why add extra complexity to support rollups when you have master-detail exactly for it.
Master - Details are Super - Lookups with extra features like rollups, sharing etc. This comes at an extra cost. Master - Details are proved to be the main culprit for the record - locking. Hence there is a strict limit on the Number of Master Details you can have whereas on Lookups limits are bit relaxed.
I have seen few projects where the Master-details use case would suit but still, they build it using lookups as the Master-Detail performance overhead / Record Locking would just be too hard to handle. Lookup gives you the power to extend that using Apex.
In Computer Science, we use this concept, open for extension closed for modification
.
Lookups are basic building structure, that provides the feature of Foreign Key
Master Details are Extension of Lookups that provide us the feature of Foreign key from lookup and so much more
Please share if there is a valid reason why they're only available for master-detail relationships.
It's by design, and how/why Salesforce decided to do it that way is abstracted.
If you are looking for roll up summary on lookup, then Declarative Rollup Summary Tool by Andrew Fawcett is what you need.