That's not even the question about react, that's simple js basics. I gonna explain on another subject, events function calls
document.addEventListener('change',(createHiveBackground));
document.addEventListener('change', (event)=>createHiveBackground(anotherParam));
The above both actions act the same, but the only difference how you coded createHiveBackground in first line your function handles by it own the incoming arguments as it would look like
function createHiveBackground(event, anotherArg){} because parent function addEventListener passes event as arguments in either cases as the first argument to the mentioned function.
But in the second case you coded the function which expects oneArgument only function createHiveBackground(anotherArg){} and you avoid conflicts between addEventListener and createHiveBackground so you use function in the middle
Another your line about difference with it:
const [hive, setHive] = React.useState(createHiveBackground());
Your createHiveBackground is written like this:
function createHiveBackground() {return data}
to provide a data that React.useState waiting for. This executes your func at once.
But this will not work at
document.addEventListener('change', createHiveBackground())
because it will be executed right in 'compilation' when no event have been fired. One exception it may return another function which will be called at event firing.
function createHiveBackground(){ return function(event, anotherParam){doSomeStuff on event}
The last example just passes a function body which may be called later
()=>createHiveBackground
it will not be invoked immediately
Coming back to your question hence React.useState expects some data - you may use any of these depending on createHiveBackground function implementation (the colleague above says:
//first two similar and used at lazy call
const [hive, setHive] = React.useState(createHiveBackground);
const [hive, setHive] = React.useState(()=>createHiveBackground());
//the next must return a data to be passed to the state
const [hive, setHive] = React.useState(createHiveBackground());
//nothing will happened because the function body will be passed but not executed
//function's body will be stored at the state
const [hive, setHive] = React.useState(()=>createHiveBackground);