Stepping out of line usually leads to negative outcomes like punishment or disapproval. You might get a detention for stepping out of line at school.
Pro Tip 2/2
Intention Matters
Whether intentional or not, 'stepping out of line' implies someone didn't follow the expected behavior. She didn't mean to, but she stepped out of line by interrupting the teacher.