* To entertain him. Mercutio is a lively and imaginative character who loves to tell stories. He may have simply been trying to entertain Romeo with a fascinating and outlandish tale.
* To make a point about the nature of love. Mercutio's story about dreams is full of symbolism and imagery that can be interpreted in many ways. One possible interpretation is that the story is a metaphor for the irrational and unpredictable nature of love. Mercutio may have been trying to tell Romeo that love is not something that can be controlled or understood, but rather something that happens to people in spite of themselves.
* To foreshadow Romeo's fate. Mercutio's story about dreams also contains several elements that foreshadow Romeo's tragic fate. For example, the story mentions a "young man" who is "in love with a beautiful woman" who is "unattainable." This could be seen as a foreshadowing of Romeo's love for Rosaline, who is also unattainable because she is already promised to another man. Additionally, the story mentions a "sword" that "pierces" the young man's "heart." This could be seen as a foreshadowing of Romeo's death by the sword.
Ultimately, the reason why Mercutio told Romeo such a fantastic story about dreams is open to interpretation. It is possible that he was simply trying to entertain him, make a point about the nature of love, or foreshadow Romeo's fate.