After we find matches based on the customer id, we have more work “left over” — that’s the “residual” bit.
For every row that matches, SQL Server is plugging values into the Website.CalculateCustomerPrice() function and comparing the result to the Unit price column, just like we asked for in the where clause.
In other words, this is happening for every row in Sales.InvoiceLines that has a matching row in Sales.Invoices.
Which is every single invoice & invoice line, as it turns out.
It’s a shame there’s no “this is why your query is slow” plan operator for scalar UDFs.