-(으)려고 states the purpose you arrived with and 오다 is the coming: 사탕 받으려고 온 건데 'we came to get sweets', 상담받으려고 왔어요 'I've come for a consultation'. It is the natural answer to 'what brings you here?', and the gym line here is offered as a script for exactly that. Compare -(으)러 오다, which does the same job in fewer syllables and sounds a shade more neutral.