It’s a very good lesson- to the point where I wouldn’t be surprised if the teacher is deliberately putting an arbitrary restriction on the assignment.
If you want to have a career, the people that pay you are going to make you do things that you consider to be ridiculous. That’s work, that’s life. You’ve got three options- Just smile and nod and do it their way, get huffy and tell them that you don’t like their yapping and you’ll do their project your own way, or politely suggest there may be an alternative way, and ask if they are willing to be flexible with some requirements.
It’s like, gotta be just one line of code, right?