It's bad to get your friend in trouble.
Bobby pulls the fire alarm, and he wasn't seen but the principal thinks it was him.
Bobby wants to get out of trouble.
Bobby insists he was nowhere near the fire alarm, and he's got nothing more to say.
Bobby tells the principal that it was Luigi who pulled the fire alarm.
Without any actual evidence the Principal is forced to let Bobby go.
Due to Luigi's spotty record he gets expelled for pulling the alarm.