But they actually belong to the basalmost Paraves.
These are the Tetrapterygidae and the Scansoriopterygids.
These 4-winged primitive birds (basalmost paraves) evolved from pterosaurs.
Later, some of these flying primitive birds settled on the ground and became secondarily flightless (eg. Eudromaeosaurids).
the work of Xu et al. (2003), (2005) and Hu et al. (2009) provide examples of basal and early paravians with four wings, adapted to an arboreal lifestyle who would only lose their hindwings when some adapted to a life on the ground and when avialans evolved powered flight. Newer research also indicates that gliding, flapping and parachuting was another ancestral trait of Paraves, while true powered flight only evolved once, in the lineage leading to modern birds.
Tetrapterygidae (meaning "four-wings") is a group of four-winged dinosaurs proposed by Sankar Chatterjee in the second edition of his book The Rise of Birds: 225 Million Years of Evolution, where he included Microraptor, Xiaotingia, Aurornis, and Anchiornis. The group was named after the characteristically long flight feathers on the legs of all included species, as well as the theory that the evolution of bird flight may have gone through a four-winged (or "tetrapteryx") stage, first proposed by naturalist William Beebe in 1915. Chatterjee suggested that all dinosaurs with four wings formed a natural group exclusive of other paravians, and that this family was the sister taxon to the group Avialae, although most phylogenetic analyses have placed the animals of his Tetrapterygidae elsewhere in Paraves, such as Xiaotingia, Aurornis, and Anchiornis being placed in Avialae.