Actually, Brody...
The film used Peter Gennaro's original conception of "America" as a dance of the Shark girls versus the Shark boys.
It was Robbins who came in and made Gennaro re-do it as a number to show off Anita and the girls.
But Robbins also wanted to give the "tired businessmen" in the 1957 Broadway audience a good old-fashioned Floradora/can-can number, in which with the girls would kick up their shapely legs and show some under garments.
Robbins was an "artiste" but he was also a showman. He knew that a musical with gang warfare and multiple deaths needed a little girly action.