A labour of love
Work undertaken for the pleasure of it or for the benefit of a loved one.
This phrase has a biblical origin and appears in Thessalonians and Hebrews (King James Version).
Thessalonians 1:2, 1:3:
We give thanks to God always for you all, making mention of you in our prayers;
Remembering without ceasing your work of faith, and labour of love, and patience of hope in our Lord Jesus Christ, in the sight of God and our Father;
For God is not unrighteous to forget your work and labour of love, which ye have shewed toward his name, in that ye have ministered to the saints, and do minister.
Shakespeare didn't use the expression 'labour of love' in any of his works but it is possible that the writers of the KJV were familiar with his play Love's Labours Lost, 1588, and that they adapted the expression from that title.