Yeah something doesn't add up.
It sounds like they are in the UK. You can't just fire someone out of the blue like that in the UK (assuming they are a FTE), unless they have done something obviously "bad" (proper misconduct etc). If they don't need you anymore there is a defined redundancy process.
If they were not a FTE and were in fact on a temporary contract, then this is totally normal and expected, and the author should have known that as a contractor. Contractors are easy-come-easy-go - that's the whole point of them, and why the pay is higher than FTEs.