1)
Why is a Zonah referred to as a Kedeshah?
1.
Rashi: Kedeshah means designated for Zenus. 1
1
See Devarim 23:18. Mizrachi - Kedeshah really means designated, sometimes for the good, sometimes for the bad - in this case she is designated for Zenus. Tosfos (to Yevamos 79b) - "Lo Sihyeh Kedeshah" (Devarim 23:18) forbids Bi'ah with one who cannot have Kidushin, i.e. a Shifchah.
2)
Why does it say "Lo Hayesah ba'Zeh Kedeshah" (also in 38:22)? It should say Lo Hayah"!!
1.
Ha'amek Davar: The people understand that her sitting here was not harlotry. Her action was not Zenus, rather, for a different intent.