I got kicked out of class today for bringing in a slice of pizza and not wanting to throw it out
Sounds like you were hungry. Did you bring enough for everyone?
No, I just wanted it for myself.
When you're very hungry you could do some things that are out of character to satisfy your hunger. Even if your very hungry, disobeying the rules in your teacher's instructions are not the way to go about doing things, you should make sure you get enough food at lunch or talk with your teacher about having a snack. If you continue this behavior of disobeying your teacher you can end up getting expelled.
Do you not want to listen my side of the story?
I heard your side and it sounded like you were breaking the rules. Rules are meant to be followed and if you were hungry, you should have eaten your pizza before class or saved it away somewhere in your backpack. Teachers have to enforce their rules to keep order among the students.