For example perhaps the machines thought it was their "duty" to preserve human kind if it was possible for human kind was their creators even if they were a "bad dad / bad mom." Thus they set up the Matrix for multiple goals and not a single goal. It is a battery source of energy, but also an old folks home for your parents you do not really want to visit but you want them to be happy (aka humans were in a nature preserve / zoo), so on and so on.
Preserve humans in a "Matrix" that simulates pastoral England, classical Greek times, or even the Garden of Eden. Make every man a mighty king, every woman a beautiful princess, or Indiana Jones, or whatever you think they want. You have the ability to provide AI NPCs in their world, so you don't even strictly have to let the humans interact with each other.
Most importantly, don't give them a world filled with computers that allow them the means to fight back.
