Also it is important to note that by including the lottery of the chests into the play, Shakespeare is making not only a play on words, but a satirical comment on the nature of parental selected marriages. Portia must fight her own free will or her desire to pick the suitor of her choice based on marital qualities she finds important vs. her dead father's actual will (hence the play on words--free will vs. actual will) who has outlined very specific tasks which must be achieved before Portia's hand can be won. What is a girl to do? Obey her father who is already dead and won't have to deal with her husband for even 1 day or follow her own instincts and pick who she desires?
The ridiculous lottery is silliness at its best, a true reflection of how Shakespeare feels about these types of contests as evaluations of life mates!