Replacing the head gasket is a major repair and expense in itself. But until you tear things down and get in and see the problem, you don't know if any additional damage was done to the motor or its components. Quite often, just replacing the head gasket doesn't fix the problem.
The mechanic likely suspects that the motor needs a rebuild - or a complete replacement - and when they see a car they know is worth less, fully repaired, than the cost of the repair, they'll take the short way out and tell you that it can't be fixed. Anything can be fixed or replaced. How much are you willing to spend?
Do you want to sink another $3,000 or more into this car to truly fix it? Are you willing to take the risk of spending $1,000+ to replace the head gasket only to find out you wasted that money? Or will you cut your losses, get what you can for what you have, and buy another car?