In the 23rd episode of Season 1 ("Skin of Evil"), Tasha Yar is
killed.
At the end of the episode, the main crew of the Enterprise attends a ceremony where a hologram of her addresses each attendee. It looks like this, to jog your memory:
Also, totally the Windows XP wallpaper, right?
Anyway, why did Tasha Yar record this message? She
died
suddenly and had no reason to expect this was going to happen.
Is this something people do in the Star Trek universe, much like people have wills?
Side question: Since the message addresses individuals, how did Tasha know who would be attending?