In 1993, Erin Brockovich (Julia Roberts) is an unemployed single mother of three children, who has recently been injured in a traffic accident with a doctor and is suing him. Her lawyer, Ed Masry (Albert Finney), expects to win, but Erin's explosive courtroom behavior under cross-examination loses her the case, and Ed will not return her phone calls afterwards. One day, he arrives at work to find her in the office, apparently working. She says that he told her things would work out and they did not, and that she needed a job. Ed takes pity on Erin, and she gets a paid job at the office.
Erin is given files for a real-estate case where the Pacific Gas and Electric Company (PG&E) is offering to purchase the home of Donna Jensen, a resident of Hinkley, California. Erin is surprised to see medical records in the file and visits Donna, who explains that she had simply kept all her PG&E correspondence together. Donna appreciates PG&E's help: she has had several tumors and her husband has Hodgkin's lymphoma, but PG&E has always supplied a doctor at their own expense. Erin asks why they would do that, and Donna replies, "because of the chromium". Erin begins digging into the case and finds evidence that the groundwater in Hinkley is seriously contaminated with carcinogenic hexavalent chromium, but PG&E has been telling Hinkley residents that they use a safer form of chromium. After several days away from the office doing this research, she is fired by Ed until he realizes that she was working all the time, and sees what she has found out.
Rehired, she continues her research, and over time, visits many Hinkley residents and wins their trust. She finds many cases of tumors and other medical problems in Hinkley. Everyone has been treated by PG&E's doctors and thinks the cluster of cases is just a coincidence, unrelated to the "safe" chromium. The Jensens' claim for compensation grows into a major class action lawsuit, but the direct evidence only relates to PG&E's Hinkley plant, not to the senior management.
Knowing that PG&E could slow any settlement for years through delays and appeals, Ed takes the opportunity to arrange for disposition by binding arbitration, but a large majority of the plaintiffs must agree to this. Erin returns to Hinkley and persuades all 634 plaintiffs to go along. While she is there, a man named Charles Embry approaches her to say that he and his cousin were PG&E employees, but his cousin recently died from the poison. The man says he was tasked with destroying documents at PG&E, but, "as it turns out," he "wasn't a very good employee".
Embry gives Erin the documents, which include a 1966 memo proving corporate headquarters knew the water was contaminated with hexavalent chromium, did nothing about it, and advised the Hinkley operation to keep this secret. The judge orders PG&E to pay a settlement amount of $333 million to be distributed among the plaintiffs.
In the aftermath, Ed hands Erin her bonus payment for the case but warns her he has changed the amount. She explodes into a complaint that she deserves more respect, but is astonished to find that he has increased itâto $2 million.

Question: Who's behaviour caused Erin to loose her case at the beginning of the story?
Answer: Erin's behaviour
Alternative answer: She loses her temper and botches her testimony