Why don't people write their own servers?

I don’t understand why people are using things like photon cloud.
Is it not much better and easier to write your own server?

What is so appealing about these programs?

Maybe having something stable and ready to use, without requiring x amount of time spent in writing the code for networking.

I don’t understand why people are using things like Unity.
Is it not much better and easier to write your own game engine?

What is so appealing about these programs?

Same thing?