She may well have known what she was doing but at 17 she was not legally competent to consent.
The legal age originally was 21 because there is some evidence the brain doesn't fully develop until early 20s.
At What Age Is The Brain Fully Developed? - Mental Health Daily
Also, in the Middle East and Far East traditionally the culture did not consider someone fully mature until 30. Hence I believe why Christ started his ministry at 30. In China one didn't start teaching martial arts for instance, until 50 yeas of age.
Personally, I think lowering the age of 'maturity' to 18 was a cynical move designed for the benefit of the powers that be. 18 year olds are much more impressionable and easier to politically manipulate.