Portia's father seems to have anticipated that young Portia would be the target of gold digging suitors upon his death. Young and in possession of land and wealth, Portia is vulnerable to men who may mislead her regarding marriage, and her father wants his "will" to exert upon potential suitors his own preference that a man worthy of Portia win her hand and inheritance.
Young women rarely would choose their own husband, and Portia is no different in this. Unlike Juliet and Rosalind, she abides by her father's decision to marry the man who succeeds in the casket game, a choice among a gold, silver and lead box.
While Portia does seem to abide by her father's will, she also seems to "bend" his will to hers.
While the first suitor leaves disappointed in his wrong choice, we find that Portia seems to add an extra condition when Arragon tests his luck. Here we see that the additional stipulation is that he may have to forego marriage to anyone should he fail with Portia:
I am enjoined by oath to observe three things:
First, never to unfold to any one
Which casket ’twas I chose; next, if I fail
Of the right casket, never in my life
To woo a maid in way of marriage; lastly,
If I do fail in fortune of my choice,
Immediately to leave you and be gone.
Similarly, when Bassanio
comes, Portia seeks to delay his choice so that she might help him choose correctly, and certainly the music she opts to play for him (with its multiple rhymes to "lead") seem to guide his thinking and his choice.
In this way, Portia abides by her father's will but also bends it to her own. A similar trait occurs when she serves as legal council in Antonio
's case. She may be faithful to the letter of the law, but she is also willing to twist is somewhat to gain her desired objective.