No, 'for the sake of' is not a formal phrase : it's a normal everyday phrase. We use it all the time in various contexts in our daily lives e.g. "My gran and grandad only stayed together for the sake of their kids".
On the Cambridge Vocabulary Profile, it is B2. This means that an average B2 candidate would be expected to know and use it.