Hmm... I think it might be speed. I'll say "thuh apple" if I'm speaking slowly, and "thee apple" if I'm speaking quickly. Which is strange, because "thee apple" sounds more formal to me, yet it's what I default to only when speaking quickly.
Speed changes it for me too. However, emphasis can also mean using thee. An obnoxious US example is people saying “THEE Ohio State University”, often with a pause after thee as well. It’s not “thee Ohio River”. You would use “thuh”.