Wasn't it Congress who passed 5 U.S.C. § 7311. which says a person may not “accept or hold” a federal job if they “participate in a strike” against the U.S. government.
https://www.law.cornell.edu/uscode/text/5/7311
originally passed as
https://uscode.house.gov/view.xhtml?edition=2023&num=0&req=g...
So arguably if Reagan had not fired them he would be failing to uphold the laws of the United States.
They were striking for less outdated tools, improving staffing levels, and other safety improvements. The solution was to give them the things they wanted.