The reason the F40 is on the Group B list is because the wiki is talking about group B in general. There was a group B class in the WEC series but was canceled along with the rally serries. Ferrari created this car to compete with the announced Jag XJ220 and porsche 961. Though the street car was officially out in 87, the actual car itself was around before the closing of group B and there were a few on the streets and on the track along with a concept being out a few years before.
Group B ended in late 1986, at the time the car being developed for Ferrari for Group B racing was the Ferrari 288 GTO Evoluzione. This car was still in development when group B came to an end, with the last two 288 GTO Evoluzione's being used as development cars for the F40. These were not however F40's.
The F40 LM, designed for racing, did not have the first chassis completed until October 1988, around two years after the demise of group B.
The F40 was not around at the end of group B at all, the 288 GTO Evoluzione was and later became the development bed for the F40, but is was never an F40 (chassis number of the development cars were all 288 GTO Evo's).
To have even qualified for group B (rally or road) homolagation, Ferrari would have had to produced and sold 200 F40 road cars, as the first production car was not delivered until 1987 this would have been rather hard to achieve (being a year after group B actually ended). In contrast the full production run of 272 for the 288 GTO was completed by early 1986, before the group B ban came about.
The Ferrari 288 GTO Evoluzione was a group B car and would have raced as such had the series not been banned, the F40 was not. The F40 was built to late, and while it was homolgated for a range of race series in the guise of the F40 LM, it was never a group B car.
Sources:
http://www.qv500.com/ferrari288p1.php
http://www.qv500.com/ferrari288p2.php
http://www.qv500.com/ferrarif40p1.php
http://www.qv500.com/ferrarif40p2.php
Regards
Scaff