This acid irritates the muscle, making it hurt. If you overdo it, your muscles will be sore the next day. After all, your heart beats all day and all night, for your entire life. A large part of the answer has to do with blood. Your heart is between your lungs.
Blood picks up oxygen from the lungs and flows directly to the heart.
This insures that the heart always has plenty of oxygen, so it does not get tired. The one exception is if the blood vessels that lead to your heart get blocked. Then the heart muscles run low on oxygen and get tired. The pain that you feel is what tells you that you are having a heart attack. Athletes exercise regularly to increase the blood flowing to their muscles.