Occasionally when creating a web application in SharePoint 2013 it may be created and show in the list of web applications but the virtual directory will remain empty.
This is caused when the server provisioning the web application is experiencing low resources. To prevent this happening again increase resources on your server or move some services to another server.
To resolve allow the web application to be created successfully do the following:
Some forums recommend copying the files from another virtual directory, do not do this as you could copy over customisations that are not applicable to your web application.
Some also recommend restarting the Microsoft SharePoint Foundation Web Application. This will work but doing this will bring your entire SharePoint farm down whilst it completes and this can take hours.