This was a motion to dismiss. Not a trial judgement.
Yes, it gets copyright law very wrong (you can't prevent copyright from existing by contract, you can only say who owns it, and that requires a specific written instrument).
However, the court granted leave to amend the complaint: " Ameritrade's Motion to Dismiss as to the First Counterclaim will be granted. However, leave to amend will be accorded so as to permit Mr. Matthews the opportunity to allege nonconclusory facts that explain why Mr. Matthews' alleged software modifications to TD Ameritrade's API are protected by a valid copyright."
So basically, not much to see here yet.