It is not an illegal contract. It is a contract that Epic _hopes_ is illegal.
I don't get to ignore my home mortgage payments without consequence even if I believe in my truest of heart that giving money to a bank is wrong. In this metaphor, Apple here is the bank saying that Epic has a habit of not paying back loans, and has publicly stated how they think the loan they are applying for is 'hot garbage'.