If you had opened your browser's JS console you'd see something like this:
ol.js:278 XMLHttpRequest cannot load file:///Users/(...snip...)/v3.15.1/examples/data/kml/2012_Earthquakes_Mag5.kml. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
The explanation can be easily found on Stack Overflow, the simplest solution would be to run a local web server that would expose your local the examples folder over HTTP. Arguably the easiest solution is to use python's in-built HTTP server. From inside of your OpenLayers/v3.15.1/
folder execute:
python -m SimpleHTTPServer 8000
or, if you're using Python 3:
python -m http.server 8000
Then, once you navigate to http://localhost:8000/examples/kml-earthquakes.html you'll see the example correctly loading exactly like the version deployed on openlayers.org.