right, but the thing is that the situation has changed. if i am invited to a party where i don't know anyone except the one person that invited me and then that very person has to cancel at the last minute, i might consider not to go. it has been said elsewhere in this thread it depends on whether this is an opportunity for me to grow or not and whether that benefit outweighs the cost.
This isn’t about growth but rather about social etiquette. In this case, although your friend is the reason you attend, it is the host who has officially invited you to the party. Now, the invite and acceptance are between you and the host directly and social etiquette requires a clear communication in case of a cancellation.
From the host’s perspective, you are still attending until you cancel. Of course people do the social calculus all the time and can choose to bail without notice. It’s been done for centuries, but is considered poor form in most circumstances except emergencies. In almost all cases a “sorry, I am unable to make it tonight,” is usually sufficient.
Of course if the host never officially invited you in the first place and you were simply tagging along, there is no social obligation and you are free to do as you please.