You were successfully made to believe you would be the bad guy for walking away when nothing could have been farther from the truth.
You worked, for nothing, on a project which belonged wholly to someone else, and they didn't even bother to turn up for project meetings.
There's often a big disconnect between people's superficial behaviour and their genuine intent, and you have to learn to read the signals which tell you the difference.
This episode might have been unpleasant but could be a cheap lesson if you learn the right things from it.