What do you mean by the question, "do morals have a purpose?" That's a very vague question and I can't really answer it with much confidence. Some people believe morals are there to keep society stable. Others believe morals are directly from their religion. Etc. I'm not sure what you mean by a "purpose" though. Again, it's very vague. I guess one could say a person's morals are to ensure that they are a good person (whatever a person's definition of good is). But in the situation you described, being 'good' is not more important than surviving. If being good prevents you from surviving, then of course being good is not a top priority.
I also don't see how you could label morals as a "bad joke." Obviously, morals exist. Will they be used in the extreme scenario that you presented? Probably not. But that doesn't mean the morals never existed. It just means morals take a place below survival and basic needs. I'm not seeing how they can be seen as a "bad joke." You should use more clear and specific language.
I don't think anyone believes morals overrides a person's basic needs for survival.







