In the third myfunc call you are passing a function of the window object.
function anyOther(){
return "otherFunction";
}
function getLocation() {
return window.location.toString();
}
function myFunc(data, func) {
console.log(data, func());
}
myFunc("From", getLocation);
myFunc("From", anyOther);
This is not working because this function will only work in the context of the window object. Now you are calling it not in the context of the window object.
myFunc("From", window.location.toString);
This is because you are passing a reference of the function to the myFunc function which then tries to call this function. Because this is not in the context of the window object this will fail.
When not to pass functions as reference:
When the functions are native implementations of the browser you can't pass the functions as arguments in another function. You can see if it is a implementation of the browser if you can see native code like this:

window.Object.assign
is a function which is implemented by the browsers and thus we cannot pass this as function argument and expect it to work.