i'm not sure what is wrong with this. Normally, it's done the other way around, IE you write the papers, publish them, and then write the thesis (whose copyright ends up being owned by some random monopoly company in the midwest). But, you got your name on the paper, and your supervisor, who almost certainly had scientific and funding input to your research, was rightfully coauthor.