Is there a reason a surgeon may prescribe beta blockers after surgery? Or as a preventative measure

Beta blockers. Beta blockers are sometimes in peri operative setting for prevention but usually recommend this starting a week or two before surgery. If used after it is usually in response to treating arrythmia or bp.
Prevent afib. To prevent an abnormal heart rhythm called atrial fibrillation. This occurs up to 5 to 15% after some types of surgeries. Beta blockers and calcium channel blockers after surgery have been shown to be beneficial in preventing atrial fibrillation.