The most basic rule of conduct is that practice makes perfect. If you want to be a concert pianist, you have to practice. If you want to grill the perfect steak, you have to practice. If you want to tie your shoes so that they don’t come untied and you don’t trip, you have to practice (for a while, then you get it).
But there’s more to it than simply practice. You have to be doing it right. Noodling on the piano for eight hours a day for ten years won’t make you a concert pianist.
If you want to be happy, you have to practice. And you have to do it right. It’s a skill. And the rules for how to do it right are what we call “morality”.
People who live for pleasure and object to moral rules on the grounds that they don’t let you have any fun are like the guy who spends all his time noodling on the piano but refuses to learn to read music or understand harmony and rhythm. He may think he’s having a great time, but all he’s producing is a noisy mess. How much more he could do if he buckled down to it!