What is Shiduch?
Jastrow translates "שידוך" as a "preliminary negotiations" to betrothal (אירוסין).
He also cites Kiddushin 12b as the source for his defintion; there, the gemara discusses the case cited in your שלחן ערוך. (he also cites Yerushalmi Kiddushin, which also discusses this case)
I heard it also is called the market
As for "I heard it also is called the market," that refers to a different type of "shidduchim," like Shalom pointed out, that in today's vernacular, boys and girls who are dating for marriage are referred to as being "in shidduchim," "in the parshah" (i.e., up to "that stage" of life), or as "on the market," available to date. I'm personally not really a fan of that last one, as it carries with it the implication that dating and marriage isn't really being treated with the seriousness that it deserves, but that's what people say.
This type of "on the market" is not related to the שוק of your שלחן ערוך, which is an example given of someone who entered marriage "on the spot," without proper consideration; here, ironically, "the market" implies the lack of shidduchim.
Why is it bad if no Shiduch?
Rashi on that gemara writes
דרב מנגיד כו' - משום פריצותא
Rav would administer lashes etc. - because it's not proper (because of פריצות)
(translation mine)
This, I believe, is intended to explain all of the reasons that Rav would administer lashes -- among them the מקדש בשוקא (someone who married a woman in the shuk/marketplace), as well as the מקדש בלא שידוכי (someone who got married without shidduchim).