I'm not sure whether you violated a law or not, but I think nobody can make any notes or stamps in your passport other than CBP / immigration in various countries.
Airlines cannot put any stamps or notes in your passport. As far as I know, neither they have a right to do this, nor your passport would be valid after unauthorized stamps etc.