That's a good point. I can't be 100% certain about this as I'm not a lawyer, let alone have access to the details of Sony's agreement with Marvel, but according to what I've been reading about this online Sony only owns the rights to Spider-Man characters for movies, not so for TV. Disney/Marvel do, and that's why we can see Spider-Man, Wolverine, Hulk and others meet each other in Marvel's latest cartoons. They don't do the same for live-action shows because they intend for them all to exist in the Marvel Cinematic Universe, where Spider-Man and the X-men can't exist. Senator Ward, however, isn't a character that had a noteworthy presence in Spider-Man mythos - I certainly wouldn't expect him to show up in any movie - , so maybe they can get away with it.