Having gone through this in May, I can tell you that there are several reasons -- depending on how long it has been since the operation (and assuming that no problem has been discovered).
1. For the first two weeks, it is absolutely forbidden to even get into a car and drive too far away from where the operation was performed. This is to ensure that in case of a problem you can get back to the cardioloist and surgeon who are most familiar with your case.
2. From 2 weeks to 3 months, there is concern about stress, both physical and mental. Until you go through this, you don't realize how much is involved in taking a flight -- including making certain you arrive on time, dragging around your luggage, going through the Security line, etc. I never realized this in the past, but as I just took my first flight since the operation, I do now.
In addition, if you need travel insurance, you will not be covered unless your cardiologist gives you a certificate stating that you have completely recovered and are able to resume all activities, including flying. No cardiologist will do this until three months have passed.
3. After three months, the concern is about your lack of movement during flights. For shorter trips (under 3-4 hours) you are only advised to walk around the plane every so often. For longer ones, you are given blood-thinning medication which you have to inject into yourself two hours before takeoff. (I walked into the Men's Room in TLV to do that and got some very strange looks from people who presumed I was shooting up.)