Before protons, neutrons and electrons were discovered, scientists tried to sort the elements by arranging them in order of their atomic weights. These early periodic tables were incomplete. If the strict order of atomic weights was followed, some elements ended up in the wrong group because their properties did not match the others in that column.
Mendeleev solved some of these problems. He left gaps in his table for elements that he thought had not yet been discovered, and in some places he changed the order of the elements from the strict order of atomic weights.
Mendeleev used his table to predict the properties of the missing elements. Later, new elements were discovered with properties that matched his predictions and they filled the gaps. A prediction that is tested and found to be correct supports a new scientific idea, so this made scientists trust his table.
Knowledge of isotopes later explained why ordering by atomic weight was not always correct. The average mass of an element depends on the mixture of its isotopes, but the position in the table depends on the number of protons. Today the table is ordered by atomic number.