We often forget that the conclusion of the war was not a known element.
As stated, Peleliu mattered little in the end, but if something had gone wrong somewhere else, it may have been the cornerstone of allied victory.
It most certainly caused Japan some level of strategic/logisitical grief, and it’s one more piece on the board the americans could seize to strengthen their offensive.
As for publicity stunts… PHI was a must. The U.S. said they would return, and everyone believed it. If the U.S. had not returned… that would have been a costly political enterprise.