According to the film's makers, the aim was to show audiences that this film includes an amalgam of all of the different Spider-Man universes that they're likely to be familiar with.
The specific inclusion of a version of the classic Tobey Maguire "spider-dance" was pushed hard by the co-director because he felt that it gave audiences a lead that this was a comedy film first and foremost and that they should expect the film to be unafraid of poking a little fun at Spidey.
Phil Lord: You may notice a bunch of scenes that are reminiscent of other iconic spider-men and moments. This version of Peter is
supposed to be an amalgam of all the spider-men that we knew in the
universe. Good and [pauses while we watch Spider-Man dance] bad.
Chris Miller: Good and great!.
PL: Sorry, good and great. That joke saved the movie.
CM: Which, the popsicle or the 'dance joke'?
PL: The dance move.
CM: That joke started the movie.
PL: I resisted that dance joke and Rodney [Rothman] pushed hard for it [both laugh]. And he was right... It told the audience what movie we were
watching. That they were watching a comedy. They laughed so big and then
they laughed at everything afterward. As a result.
CM: I call that a warm-up laugh, Phil. Warming the audience up to laugh.
Into the Spider-verse: Makers Audio Commentary.