It makes a lot more sense when you consider that Star Trek VI is basically an analogue for the end of the Cold War - which the Federation/Klingon conflict was directly referencing throughout the show. The Undiscovered Country is moving into a more peaceful time. It's also a metaphor for the retirement of the characters (and by extension, the actors). There's lots of meaning to it, there just isn't the same specific meaning that Shakespeare was using. Unsurprising, since most movie-going audiences wouldn't get the reference.