Because "fun" in that context is being used like a countable or mass noun, therefore "That was so much fun" would be the correct usage.
"Entertaining" is an adjective and you can use "so" as a modifier to express how entertaining whatever you were doing or watching is or was.
This probably explains it better than I can: