It’s because you need the poll code to be on a line all by itself. You can mix html hide details and the discourse poll code to get the results you want:
Edit: After my giddy rush of excitement at posting my first message I’ve gone back and had a look at what happens with the standard hide details, as you can definitely put the poll in with white space above and below.
For some reason it mixes the [/poll] and [/details] codes together at the end. No idea if this is desired, but the workaround above works if you need it.