cum and apud.

if cum and apud mean the same thing, way is cum only used with ablatives and apud with accusatives?

Salve, gigas phoberos.

They don’t, gigas.
Synonyma non sunt, gigas phoberos.

It’s a rule of grammar that must be obeyed.
Regula grammatica est cui morem gerere oportet.