The Justice Department said Apple illegally engaged in anti-competitive behavior in an effort to build a “moat around its smartphone monopoly.”