Firstly, I feel that you may be confusing two independent grammatical concepts: perfect aspect-tense of English and perfective\imperfective aspects of Russian. These are similar, but not the same.
What is even worse, there is no perfective aspect in English and no perfect aspect in Russian, so it makes it even more difficult to explain with examples :D
The perfect aspect specifies that the action is finished by the time of consideration and has therefore produced a result.
The perfective aspect in contrast denotes that the action is described in its whole, without consideration for its internal organization.
помыться as an example. Here, the verb is used to specify the entire process of washing oneself, where is its imperfective counterpart,
мыться is used instead for cases where the internal structure of washing is important. Consider the following examples:
Хочу помыться or
Мыться каждый день, or
Моюсь часами, or even
Cколько можно мыться?!
Take particular note of
Завтра помоюсь: it describes an unfinished action with no result, yet it is perfective, as it defines the entire action altogether. It is a complete action but is not a completed one.
In contrast, consider an English sentence
I have washed the dishes last time! Its translation could be
Я помыл посуду в прошлый раз!, but a native speaker is likely to save some time (the overwhelming majority of imperfective verbs are shorter) or even deliberately point out the grueling and demanding nature of a struggle that is washing the dishes by saying
Я мыл посуду в прошлый раз! (here
мыл could also be underlined by the speaker's intonation and a gesture of shaking an open palm facing upwards :D). So a perfect verb in English can directly translate into an imperfective Russian one.
Additionally, in your specific example, the word
чтобы introduces a subordinate clause. Think of it this way:
ходят is indeed reflecting the habitual nature of the visit to the
баня and is appropriately imperfective, but what people are visiting it for are actions that are denoted wholesale, with no regard for the inner structure of their processes—we don't particularly care if they are a habit or not.
As @Alexander has pointed out in the comments, you could have both perfective and imperfective verbs follow
чтобы, and indeed
ходят чтобы мыться would focus on the habitual nature of visits and the continuous process of washing yourself, while
ходят чтобы помыться is specifying the habitual nature of a visit but a complete (but not necessarily completed :D) action of getting clean.