And it itself comes from Latin "casa" (in the ablative), so "at the house (of)". Grammaticalization!
Also, since the English wiktionary says it forms the locative case and given the number of translations French wiktionary gives (https://fr.m.wiktionary.org/wiki/%C4%89e don't remember how to put an imbedded link), you can bet it's even more flexible (yay!)
So if i am sitting at the table then it is okay to use "Ĉe la tablo". BUT if my grandparents are sitting at the table then only "Apud la tablo" is accepted as a correct answer!!! I am confused right now! More people sit next to the table and not at?? This language getting even worse than german...
Don't be so critical, it's unbecoming. The point of either sentance was to show you the meaning and usage.
Think about a nightstand or bookstand, it can also be referred to as a "table" of sorts. Grandparents whom are reading next to the table would be referred to with "Apud". However, if they were sitting at a dining table, then one would use "ĉe". It does not matter whom is sitting where, but there is a difference between "next to" and "at". For one, It's impossible for a cat to sit "at/ĉe" a dog, but it is possible for a cat to sit "next to/apud" a dog.
No, cxe is "at", with an idea of close proximity (it can also mean "at someone's place", and it is the equivalent of a locative case, contrary to apud, which is equivalent to the cross-linguistically rare case of apudessive, and just means "next to", with an idea more or less remote closeness). Sur is "on": one object is physically above the other and is touching it (just "above" is super)... Unless I'm totally mistaken?
But is there any case which shows clearly distinctive role of those two prepositions? Because I'm getting confused as well. Up to now Esperanto looked pretty clear and regular, so if "apud" can be used for both of the two cases you have mentioned and the sentence still can be easily understood, what is the reason for adding another extra word for it?
There's an "extra word", because they have two different meanings. This is simply demonstrating how it's used. Zamenhof made a lot of things similar to English. Both "ĉe" (at) and "apud" (by/next to) are used in the same ways they are used in English, and in English, it is OK to say "I sit by the table" and "I sit at the table". They just denote different things. I'm seriously not sure how anyone could get this mixed up. If you know English, then you should already know how to use these two words for their respective forms.