Because that’s how he was taught by his teacher, Socrates. That philosophy is better taught and learnt through a dialogue rather than a long monologue where the writer preaches to the reader.
Of course, Socrates was against writing altogether. However Plato decided to combine the best of both worlds, teach philosophy through dialogues of Socrates but actually write down these dialogues.
Plato’s books became more popular than previous philosophy books, which weren’t copied, at least not enough to survive over the centuries so this method of writing philosophy became quite popular. Aristotle did write more in a conventional monologue style and was even more popular in the middle ages. But personally when I read philosophy I enjoy Plato’s books while finding Aristotle’s boring. Plato’s dialogue style survived through the ages. Most famously, Galileo wrote his theories on heliocentrism etc in a dialogue form:
The Dialogue Concerning the Two Chief World Systems, written in 1632 AD, in the tradition of Plato.
In 1779, another great philosopher, Hume, wrote his theories in the book “Dialogues Concerning Natural Religion”. Although in modern times this style has become quite rare becaouse that’s not helping in academic writings, it’s still used in popular science books all right. One of the best selling ones, Douglas Hoffstadter's “Godel, Escher, Bach“ includes some dialogue although it’s not a full dialogue. Then again there are ones that are based on dialogue or…tetralogue.
And let’s not forget mentioning the latest form of presenting ideas, internet. I often post with closed comments and people lose their minds why they can’t engage in a dialogue, they just love it. And who doesn’t? I mean ask yourself, how often did you spend hours, losing precious sleep time just browsing unkown, unimportant, random people arguing in comment section of social media over the most trivial thing? It’s something people are attracted to read. Hell, even without the comments Quora’s whole thing is a dialogue where there are questions and answers. And if one looks at youtubers, not only they often have a second/third presenter (often just a talking pet or something) to engage in a dialogue but also a common trope is “response videos” where some other guy’s video is broken into pieces, a clip presenting one’s idea is shown and then the presenter counters it. Or maybe rates it and explains his thesis why this is right to get a good mark or wrong so it gets a low mark.
All these show that throughout the ages the dialogue form of presenting ideas is a nice popular, and good, way to do it. Socrates taught that to Plato and Plato wrote his books following this style.