The character lied to someone and then narrated
優しい嘘もこの世にはある。そういうことだ。
I understand that there are a variety of meanings that this phrase can add but I am unsure what it is adding to the whole here. For example, how would this line have been interpreted differently if そういうことだ was removed completely?