I don’t think it’s illegal but it is inethical. Most pharmacists will fill a script that a doc wrote for himself or a family member for asthma meds, blood pressure or heart meds but if it’s a controlled substance then most will not but it’s up to the pharmacist.