They probably wouldn't know. The same way my employer probably wouldn't know if I had a beer during lunch, or added some vodka to my water bottle at my desk. It's the rule and they are asking you not to do it. It's up to the individual to decide if they will follow the rule or not.
I don't mind paying the corkage fee personally, and am surprised (ok not really) that some people try to find a way around it. Not speaking about you OP, I understand you are asking an innocent question.
Per the Disney rules you are not supposed to bring a glass of any type of alcoholic beverage with you from your stateroom to dinner. Also you should be charged the $20 corkage fee if you bring a bottle of wine to be served, open or not. I'm sorry Disney isn't consistent on enforcing this, because I feel like it ends up being money out of the server's pocket to some extent.