A public school expelled a pupil after his GCSEs because they had a "queue" of students ready to take his place, a court has heard.
Rhys Gray told the court he had obeyed the rules 90% of the time
Russell Gray, 49, is taking civil action against Marlborough College, in Wiltshire, because he believes its expulsion of his son Rhys is unlawful.
Mr Gray believes his 16-year-old son was expelled partly to protect the school's standing in the league tables.
The college said Rhys was expelled because of continued bad behaviour.
Mr Gray, from London, told Southampton County Court that there were several factors in accounting for the school's decision to expel Rhys.
"Getting rid of him at an earlier stage would leave a gap in their coffers," he said.
"The combination of mediocre results according to the school's confident expectation, and mediocre, poor behaviour, doesn't represent an attractive package, particularly when there's a queue of people outside the door ready to switch in with him at that particular time."
Monica Carss-Frisk QC, representing the college, said that was a "serious allegation" to make.
She has argued that Rhys had an "appalling record" of behaviour during his three years at the college.
Rhys told the court he had obeyed the rules 90% of the time.
Ms Carss-Frisk asked: "You have the worst disciplinary record in the school that anyone can recollect. How can you say that you abided by them 90% of the time?"
Rhys replied: "Because it's a fairly strict school."
Of his behaviour, he said: "I probably should have changed it but I think that the extent was fine in terms of the sixth form. I was under that impression from the teachers.
"I did abide by the little rules, sometimes I didn't and I tried to minimise how much I didn't."
Rhys said he behaved like a lot of other pupils at the school but Ms Carss-Frisk said: "You were worse by a considerable margin than anyone else."
In a statement supplied to the court, Marlborough College headmaster Nicholas Sampson said that Rhys "distracted others" and "disrupted" their learning
He added that Rhys took up a "disproportionate" amount of adult time.
The case continues.