If you're caught sneaking food into the movie theater and there's signs clearly posted that outside food and drink are not allowed then what happens can depend on the theater.
They can ask you to throw the food out or leave. Or they may just ask you to leave the theater and if you don't then you could be arrested for trespassing on the private property.
The no outside food or drinks in movie theaters rule is a rule set by the movie theater themselves so they have the say as to what can and can't happen.
It's not illegal to take food into the theater but you have to abide by the movie theaters rules or be kicked out.