as a matter of social courtesy; for social reasons
Used to describe actions taken out of social obligation or to maintain appearances, rather than personal desire. Often appears in formal or written contexts.
I had to attend his party as a matter of social courtesy.
Sometimes I go to drinking parties I'm not keen on out of social obligation.
Refers to a sense of duty or obligation, often in personal relationships. 交際上 is more about social appearances and formal courtesy.
Compound of 交際 (こうさい, 'social intercourse') + 上 (じょう, 'from the standpoint of').