Yes, that is because you are pulling Devices based on Locations. This means you will ONLY get Devices that are attached to Locations. To get all Devices, you have to add the following in your controller:
$devices = Device::all();
return View::make('devices', compact(['locations', 'devices']);
Then in your code, loop through the devices, instead of locations:
@foreach ($devices as $device)
// ...
@endforeach
Your loop above would be better written as:
@foreach($locations as $location)
@foreach($location->devices as $device)
{{ $device->name . "" . $location->name }}
@endforeach
@endforeach
I might not be understanding your intent correctly, as I don't see why you would want to loop through devices, regardless if they are associated with location or not, in a location loop. Could you explain your use-case in more detail? That may help us help you better. :)