There is clear alliteration in "the Wood, the Weed, and the Wag," and this of course helps to emphasise these three important words and their significance to the poem as a whole. There is of course an allegorical meaning and didactic purpose to the poem as a whole, that is signalled by the opening stanza of this poem:
Three things there be that prosper up apace,
And flourish while they grow asunder far;
But on a day, they meet all in a place,
And when they meet, they one another mar.
The father is clearly warning his son about the way to live his life, and the allegory of the wood, the weed and the wag clearly is his attempt to try and instruct his son as to the best way to avoid calamity but also to threaten him with what could happen to him were he to not follow his father's advice. The son needs to therefore make sure that he never lets the wood, the weed and the wag meet together so that each can "flourish" whilst they live apart from each other. The poem is allegorical because it talks about the best way of living your life and avoiding trouble.