Ethical audits by a series of leading high street retailers failed to spot that a supplier was employing a "slave workforce" in the UK, a jury has been told.
Large numbers of Hungarian nationals were employed by bed-making firm Kozee Sleep which supplied firms including John Lewis, Next and Dunelm Mill, Leeds Crown Court heard.
Three men connected to the West Yorkshire business have gone on trial accused of people trafficking.
A jury has been told that the Hungarians were provided to Kozee Sleep by Janos Orsos and his people-trafficking organisation to work at the firm's factory in Dewsbury and its subsidiary, Layzee Sleep, in Batley.
Prosecutors said company owner Mohammed Rafiq and two other men who had positions within the firm - Mohammed Patel and Mohammed Dadhiwala - knew that workers supplied to them by Orsos were trafficked.
Christopher Tehrani QC, prosecuting, told the jury: "Kozee Sleep provided some of the UK's largest retailers with beds and mattresses either directly or through intermediary companies.
"These companies included Next Plc, the John Lewis Partnership and Dunelm Mill.
"As part of the contract, Kozee Sleep was required to adhere to each company's policies re ethical trading, which included how they treated persons who worked on their premises."
Mr Tehrani said each firm conducted regular ethical audits prior to May 2014 but he said: "Nothing untoward had been uncovered during those audits."
The prosecutor has told the jury: "The prosecution submit that the three defendants were involved with Janos Orsos and his human trafficking organisation to source them cheap slave labour to work at Kozee Sleep and Layzee Sleep factories.
"The prosecution case is that the three defendants were aware of the circumstances of the Hungarian nationals who were working at these sites and went along with their exploitation as a slave workforce for their own and others' gain."
Rafiq, 60, of Thorncliffe Road, Staincliffe, Patel, 40, of Carr Side Crescent, Batley, and Dadhiwala, 46, of Upper Mount Street, Batley Carr, all deny a single count of conspiracy to traffic individuals within the UK.
Mr Tehrani explained how workers brought to West Yorkshire from Hungary were normally given £10 a week and told they would get £1,000 after six months. They would also be given tobacco, food and accommodation.
The prosecutor said there was evidence Orsos was paid £3 a hour for the workers he provided - well below the minimum wage and normal agency rates for the area.
He said one man, Robert Bodo, came to Batley from Hungary in January 2010 and was taken to live in a property in the town called Gothic House where 40 to 50 people were living and he shared a room with three others.
Mr Tehrani said inspectors found the house was in "a horrendous state".
When the authorities issued a prohibition notice on the house, Mr Bodo was moved, he said.
He told the jury how Mr Bodo was at Kozee Sleep for three-and-a-half years where he worked a minimum of 60 hours a week or he had to do extra work somewhere else.
The prosecutor said he was paid £10 every Friday by Orsos. When he found out Orsos was being paid £3 an hour by the firm, Mr Bodo tried to leave but "couldn't as Janos Orsos had his national insurance and bank card", the prosecutor said.
Mr Tehrani told the jury how Mark Kovacs came to the UK in January 2013 and was put in a two bedroom house in Rand Place, Bradford.
He said: "There were mattresses in every room. During the four months he lived in this property, Mr Kovacs estimates that between 25 and 42 people were living in the premises at any one time."
The prosecutor said he was later moved to a three bedroom flat in Ravensthorpe, Dewsbury, where, when he moved in, 30 people were living.
"He describes people sleeping anywhere they could - in beds, bunk-beds, on mattresses, on the table or on the floor," Mr Tehrani said.
He added: "The house was overcrowded."
Mr Tehrani said that as well as working 8am to 7pm weekdays at Kozee Sleep, he was also expected to work for free for Orsos at weekends doing house renovations, painting and gardening, from 9am to anything up to 6pm or 7pm.
He said Mr Kovacs "escaped Mr Orsos's clutches" with the help of a charity called Hope for Justice.
The trial, which is expected to last 10 weeks, continues.