The view of the majority is that doing cooking and other household labor is not obligatory on the wife. But it is permissible for her to do so if she does it voluntarily. And it is recommended for her to do it if the custom of the place is that women do household chores.
According to the Hanafis it is the ethical obligation of the wife but is not enforceable if she refuses. According to the Malikis it is obligatory on the wife to do the indoor tasks of the household if the custom is that women do these themselves.
See Mawsoo’ah al-Fiqhiyyah: Vol 19 - page 41-44 and Vol 24, page 59 and Volume 30 - page 126 and Fiqh al-Islami wa Adillatuhu. Further they state that in certain cases it is actually obligatory on the husband to provide a servant to the wife who would do such chores, and the conditions for that include:
- when the wife does not agree to do such chores herself
- the wife is from a family whose custom or financial status is such that in her own home these tasks were done by servants. If she did not cook and clean in her own father's house then she can not be expected to start cooking and cleaning in the husband's house.
- the wife is unable to do the tasks, because of weakness or an illness etc.
- the husband is financially able to afford a servant, if he is not able then it is obligatory on the wife to do the work
Why is this the case? Because there is no clear evidence to support the claim that doing household work is obligatory on the wife. The only obligations on the wife that are made by the marriage contract are those which are required for sexual intimacy. Maintenance is actually due on the husband, and services like cooking and cleaning etc. are really a form of maintenance.
This is despite the fact that we might find reports that the sahabiyaat performed household chores. For example Fatima, the daughter of the Prophet ﷺ (see Bukhari 5361) and Asma bint Abi Bakr (see Bukhari 5224 and Muslim 2182b).
If the Prophet ﷺ asked Fatima to do household chores that does not mean that it was made a religious obligation, rather it was personal advice, and Fatima voluntarily agreed to it, and Ali was not able to afford a servant anyways. Similar was the case with Asma, her husband was poor and Asma had voluntarily agreed to perform the tasks. A brief discussion of this is found in Fath al-Bari 16/351 and 15/643.
On the other hand, it is well established that providing food, clothing, maintenance and accommodation is the duty of the husband. Cooking and cleaning are services that are associated with these. Further it is also established that the maintenance should be according to the financial means of the husband and according to what is considered appropriate according to customs.
وعلى المولود له رزقهن وكسوتهن بالمعروف
Upon the father is the mothers' provision and their clothing according to what is acceptable.
— Quran 2:233
لينفق ذو سعة من سعته ومن قدر عليه رزقه فلينفق مما آتاه الله
Let a man of wealth spend from his wealth, and he whose provision is restricted - let him spend from what Allah has given him.
— Quran 65:7
أسكنوهن من حيث سكنتم من وجدكم ولا تضاروهن لتضيقوا عليهن وإن كن أولات حمل فأنفقوا عليهن حتى يضعن حملهن فإن أرضعن لكم فآتوهن أجورهن وأتمروا بينكم بمعروف وإن تعاسرتم فسترضع له أخرى
Lodge them [in a section] of where you dwell out of your means and do not harm them in order to oppress them. And if they should be pregnant, then spend on them until they give birth. And if they breastfeed for you, then give them their payment and confer among yourselves in the acceptable way; but if you are in discord, then there may breastfeed for the father another woman.
— Quran 65:6
ولهن عليكم رزقهن وكسوتهن بالمعروف
Their rights upon you are that you should provide them with food and clothing in a fitting manner.
— Muslim
Further it is prescribed to treat the wives with kindness, and it is against kindness to obligate her to perform services against her customs or habits and that too when it is financially possible to provide an alternate for them:
وعاشروهن بالمعروف
And live with them in kindness.
— Quran 4:19