One of my first jobs was at a startup founded in the late 90s. We had a compiler to transpile UIs and business logic to C#, JSP, ASP.NET and Java, depending on what the end customer's requirements were.
Was this a good idea? Separate question. But that's one story of why a startup might write a compiler. I often think startups do things the hard way just to turn a boring task into an interesting one. Conveniently, good startups have technically strong people who can do this without it being a drag on productivity. This company had no shortage of talented folks--their staff have gone on to work at Google, Amazon, Microsoft and at least one YC company.
Was this a good idea? Separate question. But that's one story of why a startup might write a compiler. I often think startups do things the hard way just to turn a boring task into an interesting one. Conveniently, good startups have technically strong people who can do this without it being a drag on productivity. This company had no shortage of talented folks--their staff have gone on to work at Google, Amazon, Microsoft and at least one YC company.