The word "salt" comes from a rather old chemical theory, established in the $19$th century, before the "discovery" of the ions. At this time, acids were substances that turn tea yellow and cabbage red. Bases were substances that turn tea brown and cabbage blue. Other indicators were also used.
Acids formula were written $\ce{H_nX}$ and bases $\ce{M(OH)_n}$, with M being a metal, X a non-metal or a group af atoms, and $n$ an integer.
At this time, chemists discovered that each base can react with any acid according to the general equation :
Acid + Base --> Salt + Water
This definition of "salt" (as a result of the reaction acid + base) was considered as valid even if the acid or the base was not soluble in water. For example, if an acidic solution was not acidic any more after reaction with an insoluble substance, this last substance was accepted in the category "base", even though it does not react with indicators.
If metallic oxides were also reacting with and destroying acids, they were admitted in the category "bases". So any acid can react with any base to produce a salt. A salt is by definition the result of any reaction acid + base, after loss of water.
Experiments show that $\ce{AgCl}$ can be obtained from $\ce{Ag2O}$ as a base after reaction with $\ce{HCl}$ as an acid, even though $\ce{Ag2O}$ and $\ce{AgCl}$ are sparingly soluble. So $\ce{AgCl}$ is a salt. Its poor solubility was not considered as important, in the 19th century.