The National Defense Authroization Act basically keeps in existence and funds the US military every year. Not signing it would've been a poorly chosen battle.
At the end of the day, not only do we have a divided system of power by design, Congress is the first among coequal powers in that design. Laying all the blame at the feet of the president for Congress enacting bad law makes no senss. I think some people love our system in theory but don't like it in practice.
It's a budget bill; it gets enacted every year to fund the military. It must be signed eventually (and in this case, on the very last day). Blame your entire government for putting things like the infinite detention of citizens inside of a budget bill.