People who read submitted stories for consideration usually dump stories that don’t imediately grab their attention. If the writer can’t grab the reader in the first 10 minutes, it is a fail. But when you get an established writer that kind of goes out the window. By then Woody Allen was a big deal and could make the movies he wanted. Some people love his work. Some hate it. But by 1977 when he did Annie Hall, he could basically do what he wanted. So if you really want to know why it won over Star Wars, you have to watch the entire film, no matter how much you hate it. The thing that is true about his movies (which used to star him and now feature someone less annoying in a similar role) is that they are all the same in some ways. The ones he’s made more recently (that he is not in) are far better than his 70’s and 80’s films.
But the real reason Star Wars did not win is because of its genre. Whether you call it science fiction, fantasy, science fantasy, or space adventure, it is not a genre that has ever won an academy award for best picture. The fact it was nominated was incredible. The academy doesn’t usually take films like that seriously.