The justification for the use of the bomb in WWII can be debated but one interesting point I have heard is that for Truman to not authorize it's use would have amounted to political suicide. After pouring so much money and research into the project it would have been difficult if not impossible to then change course and say "well, we have this absurdly powerful weapon the likes of which the world has never seen before, and we know it could end the war in the pacific theater with near immediacy as well as likely establish The United States as the predominate world hegemon for years to come. We also spent years and billions of dollars developing it, but now we're just going to put it on a shelf and end the war another way." People would have been outraged. It's easy to look in hindsight and judge the morality of an act of war but often these judgements ignore the political motivations of those actions and only take into account the strategic benefit with respect to the cost of civilian lives.
With the death star there may have been a similar situation where the momentum behind the project was simply too great to build it then not use it, even if only to prove its power.
(For the record I have strong moral objections to the use of the bombs over Japan and don't mean to condone their use in the above comment, only to provide a short summary of a popular theory as to why they were used)