Why not? Because you don't trust your skillset to write one? Because you don't find time to write a good enough one? Because the existing ones are good for you? Those can all be valid reasons.
But I don't buy into the general "software you shouldn't write yourself" thing. If everyone would follow that advice, we would have a lot less progression and improvements in the field.
I have written custom HTTP implementations for all protocol versions and would be find deploying them in production - that's what they had been written for. I would also be fine writing a custom TCP stack or TLS stack if something requires that.
But before doing that I would need to make sure I've done all my due diligence: Have I fully understood the problem - and is my solution solving it? Do I understand all the edge-cases, which might lead to serious availability or security issues later on? Is my code well tested? Obviously there is always something that one only learns later, so those checks will never be exhaustive. One good minimum check is reviewing your own implementation and tests against the one of existing implemetations, and see where it improves something and where it might miss out on something.
You will also need a goal, on where you want to improve over the existing solution. If you don't have that goal, and have no way to measure/quantify it, then don't do it. Also think about how much that goal really matters for your end product. If it doesn't matter at all - then either don't build the thing or build it as a side project or learning project.