Literally, of course, a streetwalker is merely a pedestrian, anyone who is out for a walk either in or along a street.
Even though this sense of the word is known and has been used for many years, a still older use is the one applied to a woman of easy virtue, and again the origin has been lost in the mists of antiquity.
This sense dates to the sixteenth century, and was probably known to Shakespeare.
It seems probable that the term was coined as being descriptive of the practice of prostitutes in pursuing their trade openly on the streets rather than awaiting a customer’s chancing to seek them out at home.