St. Thomas defines scandal as “Something less rightly done or said, that occasions another’s spiritual downfall.”
The Catechism promulgated under Pope St. Pius X. says
Q: What is Scandal?
A: Scandal is any word, act, or omission which is the occasion of another’s committing sin.
When a teacher, who a parent trusts to educate their child on their behalf, uses IVF to get pregnant, this scandalizes the students. Imagine when they encounter the Church’s teachings on IVF, they now have a conflict “The Church says it’s wrong, but Miss Susie, who taught me to read and helped me learned math did it and is proud of it, so surely it can’t be wrong.”
While it is not really this simple, a good rule of thumb is this: If you are in a position where children are expected to look up to you, any sin you commit that they see is scandal.
A teacher is not just administering a class on a specific subject, but is a role model and someone for students to look up to. I understand that this is confusing to non-Catholics, but ultimately every Catholic institution whether it is a school, hospital, charity, etc. has the primary goal of getting souls into heaven. If you provide some material service for someone that helps them in this life (teach them math, feed them, etc.) but your immoral behavior causes them to think certain sins are ok and it threatens their eternal soul, then they are much worse off than if you had not provided them with the material service.