Also note that this has grown from previous editions where they had dogma's and spheres (which are in my opinion the predecessors of portfolios and domains)
Wikipedia on clerics from D&D wrote:
The 2nd edition usually required a cleric to pick a specific religion or mythos. Within the mythos/religion chosen by the character are abilities and powers, represented by the Spheres of Influence (Combat, Creation, Healing, Necromancy, Protection, Sun, Weather etc.) defined by the worshiped deity's dogma (e.g., Tyranny, Death, Life, Healing etc.), power (demi, lesser, intermediate or greater power) and alignment (Lawful Good, Chaotic Evil etc.).
I myself see domains as a sort of pre-arranged set of powers and blessings a deity can ordain to his followers. Noticeable in the cleric powers (such as Healing and the empowered healing spells) and the domain spells they gain. A form of clearances for their followers to tap into certain parts of magic they otherwise would be restricted from (through clerical divine spellcasting).
On a grander scheme as Tormak said the portfolios are the pretty function titles and status the deities vie for. The domains might just be another way to limit the power of every individual deity and its followers as not to upset the power balance between them.