Conley Thompson was found inside the plastic tube after he went missing in July 2015.
Barnsley Magistrate’s Court heard the site in Barnsley, had “substandard” fencing which failed to keep youngsters out.
The BBC reported Howard Civil Engineering, which admitted two health and safety breaches, will be sentenced in May.
Conley told his mother he was playing out with friends when she last saw him alive.
He was later reported missing, sparking a search which ended when his body was found on the site in Church View, Worsbrough.
Andrew McGee, prosecuting on behalf of the Health and Safety Executive, told the court the development was “slap bang in the middle of a residential area”.
He said fencing surrounding the development was “significantly substandard”.
McGee told the court: “Either (the fencing) wasn’t a suitable height or it was non-existent, or, where it did exist, it was poorly maintained.”
He added that industry guidance noted “many children see construction sites as adventure playgrounds” and they should be protected against the dangers “even though they may be entering as trespassers”.
McGee said there was evidence adults and children were “frequently and easily gaining access to the site” and that one worker was aware of people “climbing over the fence and getting in”.
A child previously said Conley had been seen on the cages containing the black pipes and was “running across the top” of them”, McGee said.
The court was told the boy “clearly had a history of going on to the site” and it was “a location he found tempting to enter”, as did other children in the area.
Although the precise timeline of Conley’s death was not known, a pathologist found he must have gone into the pipe, which was designed to house fence posts, feet-first.
McGee said it was “possible he slipped in with both feet while standing on the edge, or he might have lowered himself in – nobody knows.”
In mitigation, James Maxwell-Scott said managers at the firm were not aware children had been on the site before the boy’s death.
He said: “Conley Thompson’s death was a tragedy for his family and friends.
“The defendant hopes the conclusion of this prosecution will help in some small way to bring an element of closure.”
Managing director Michael Howard pleaded guilty on behalf of the Leeds company to failing “to ensure necessary steps were taken to prevent access to the site by unauthorised persons”.
The judge adjourned the case for sentencing at Sheffield Crown Court on May 5.