This idiom comes from the ancient text 《左传》 (Zuo Commentary), where 经 and 义 referred to the unchanging principles governing heaven and earth. Over time it evolved to mean anything considered self-evidently right.
usage
Often used critically - when someone says 他觉得这是天经地义的, it usually implies the person has an entitled attitude and takes things for granted.