Some cmdlets return objects by default, some return nothing, and others optionally return objects. New-ADOrganizationalUnit falls into the latter category. When you invoke it without -PassThru and you attempt to assign its results to a variable, PowerShell does create the variable and it does perform an assignment, but it isn’t the assignment you were expecting. The variable created, but it is assigned to null in this case. To validate that the variable exists following that call, you can use Get-Variable which will raise an error if a variable does not exist. When you changed your logic to use -PassThru, you instructed New-ADOrganizationalUnit to return the object it created, which PowerShell then assigned to your variable.
Does that help?