Question: When I delete rows from a table in SQL Server, the size of the database file does not get smaller. Why is that? Even if I delete every row from every table, the file size remains just as large as before the delete.

I'm interested in understanding why, not how to shrink the database file(s).

Answer: 
Space in database files is allocated as needed. When rows are removed from a table, that space is simply marked as unused inside the datafile. Datafiles do not shrink automatically (unless auto-shrink is turned on) because that requires extra disk I/O that is typically counter productive for performance. The assumption is that any unused space will at some point be re-used by new rows.

To summarize, space allocated to the file on disk, and the logical size of tables within the database are not tightly coupled.

In more detail (although still very simplified):

They are definitely related. Rows in a rowstore live on pages, which are 8k in size and arranged into extents. Extents are groupings of 8 contiguous pages on disk.

Rowstore rows lives on pages and when "deleted" are not physically removed from the file - just marked as "free" inside of SQL Server through the use of bitmap and bytemap allocation structures and SQL Server will re-use the space accordingly.
In simplistic terms, it's not like a text file where deleting a few rows of data and saving shrinks the file. SQL keeps the space allocated in the data file to give it free space to accommodate more data over time without having to grow the file again.

Think of it like a bucket - you don't go chopping the top off after you've poured out half of the water just because you don't need that extra six inches of plastic to hold the remaining water in.