He's wanted to play Batman since he was a kid. When he was young and he was hot shit, Batman was already cast - the year Good Will Hunting came out and people started giving a crap about Ben Affleck was the year Batman & Robin came out and people stopped giving a shit about Batman.
When they rebooted Batman in 2005, he was busy doing other things, or wasn't asked, or whatever. So it went to Bale and was a huge hit, which must have been both great for Affleck as a Batfan and awful for his pride as an actor, because he would have wanted to be the one to rehabilitate the character in film. He would have dreamed about that.
Then when he got the opportunity to play the character it was in a shitty, shitty movie that all the press had spent the weeks leading up to release saying he'd personally and heavily rewritten his part for. It was panned, but, unlike Batman & Robin it didn't sink without trace. It made a lot of money - not anything like as much as the studio wanted, but more than enough to guarantee that they'll hold him to his contract.
He's got to be part of this shitshow. It could easily destroy his credibility as an actor/writer/director, and he'll never, ever get another shot at playing Batman.
The thing is, he turned this exact same project down - as director of the JLA movie - in 2012 when it was offered to him. Then they went with Snyder after MoS came out, and for whatever reason, Affleck signed up.
It's hard to feel too sorry for him, especially when you remember he's getting paid a lot to do this.