DOM Events with JavaScript: EX6.Event Object Properties - Why does 'sharePhoto(event)' get assigned to share.onclick without a parameter?

https://www.codecademy.com/paths/web-development/tracks/build-interactive-websites/modules/dom-javascript-events/lessons/dom-events/exercises/event-object-property

Why does ‘sharePhoto(event)’ get assigned to share.onclick without a parameter? How would this function know what event it will work with?

let social = document.getElementById('social-media');
let share = document.getElementById('share-button');
let text = document.getElementById('text');

// Write your code below
let sharePhoto = function(event) {
  event.target.style.display = 'none';
  text.innerHTML = 'You share the puppy in ' 
  + event.timeStamp + ' ms.';
}

share.onclick = sharePhoto; 
//how does this function work if not passed the 'event' arg from its definition?

event is a global object with target attribute that is bound by the click event until such time it is handled.