I can't defend any code quality (and I'm certainly not associated with the project, I merely host my own/private network)...but i suppose php was chosen as the stack for (hopefully) more universal adoption. Most low-cost/budget (old school) web hosting companies support php out of the box...and the intent is for folks to host their own network instead of hopping on others, etc.