If the choice you presented were between our civilians and their civilians, I would have a different response. But only military targets - including ours - are legitimate in warfare. We "cheated" far worse than Pearl Harbor when we chose to sacrifice the enemy civilians rather than our own military personnel.
If we were unable to prevail any other way ... we should not have prevailed. Why were nukes not necessary in Europe? Why did an invasion work there?
It's very sad that oftentimes the side of "good" is not the mightier side. Perhaps that was the case in WWII, and we were simply not able to honorably defeat the Empire of Japan. I'm sure many reasonably aggrieved parties today cannot honorably defeat the Empire of the United States. Should they resort to defeating us by nuking Los Angeles and Pittsburgh?
.