Character development for Sisko. He started off the episode as this angry, unhappy man who couldn't find his place in the galaxy and was considering his position in Starfleet; he'd been given an assignment that was hardly the envy of officers everywhere.
His interactions with the Prophets snapped him out of his fugue and gave him purpose. By the end of the episode, he was more content and eager to begin his command.
To show that development, there had to be some traumatic event in Sisko's past, rather than just making him a grumpy old man. So linking it with Wolf 359, also probably the nadir of Picard's life was an inspired way to go - Picard served a purpose in the episode, rather than just a 'hey, look, the guy from the previous show' token cameo.
And it also established DS9's own tone. After the no-conflict TNG crew, it came as a shock to see Sisko being outright rude to the beloved Picard. It was also a creatively risky step - audiences may not have appreciated Sisko's attitude to such a popular character, particularly when we (unlike Sisko) knew how much angst the events of BOBW had caused Jean-Luc.