If you are creating a table that you want to be sortable then include the class="wikitable sortable" (see Edit Tips - Tables). This would be typical.
If you are creating a table that should not be sortable/searchable (e.g., in a space page) then do not include the class="wikitable".
The WikiTree Browser Extension includes a feature for Table Filters and Sorting. When this feature is enabled, any table that has the class wikitable can be sorted by any column heading. It will also add a row at the top of the table that can be used to search the table.
It would depend on what style sheets have been applied to the class, I believe.
See