> it's debatable on whether or not those bombings did indeed cause the surrender of Japan
They were specifically mentioned in emperor's address. Yes, they caused the surrender.
> Nagasaki and Hiroshima were not military targets
They were military targets. There was army HQ, troops stationed there, factories which were producing military goods.