Any ideas why she does this
Yes...because she's a cat...
and can she be trained not to?
Ha. Probably not, but it depends on the kitty...I had one kitty who wasn't interested in the food, just wanted to be where the action was. I would say, loudly, "NO," pick her up, put her on the floor, repeat...After the 5th or 6th time, she'd get bored and give up.
With the one kitty who did always want my food, what worked was to let her sniff whatever I was eating or drinking that interested her. Most of the time, she was just curious, and once I let her sniff, she was satisfied and wandered off. But if I thought she might like it and didn't want her to eat it, I'd substitute something else, like a piece of orange, which I knew she wouldn't eat.
You might be able to do something similar - just keep something she wouldn't like, but that wouldn't be harmful, like a glass of lemonade or a piece of citrus fruit, or something in vinegar, handy. When she jumps up wanting what you're eating or drinking, say NO, put her close to where her food is, then offer her the icky thing rather than what you were actually eating.