"Beijing is in China."
The sentence indicates the location instead of the verb. Since Beijing and China are both locations, we want to locate Beijing in China. 在 is used here to specify that, so the sentence
literally means "Beijing in China". Note that 是在 is not included in the sentence.
The meaning of 里 would be "in/insidw" when something is being physically enclosed (say, within 4 walls and a ceiling, inside a bag/box/container). This concept does not extend to "in" geographically. So you can say 我睡在车库里 I sleep in the garage (because it has walls and a ceiling) but it is not good to say 我住在北京里, or 我住在中国里。Certainly this is just a simplified explanation and you may find counter-examples. Hope this will still be useful.