We just returned from taking the train from Como to Lugano. When taking this route, please grab your tickets round-trip because if you do a one-way from Italy to Switzerland, and then purchase a return from Switzerland back to Italy, the prices double. Your ticket is good for the entire day or if you want to spend the night purchase your ticket for the following day. Travel times are not important but route And date are.
Can I ask what you paid per person? 2nd class or 1st class?
If you buy a one way ticket Como - Lugano that will cost you (in Como) 11,- Euro
If you then buy a one way ticket back to Como in Lugano you pay 12,-CHF, which is indeed a little bit more than 11 euro. (but not double, as the OP seems to suggest...)
But buying a return ticket in Como, that covers both the outward and return trip would cost you 22,- euro in Como, and that is indeed the better option here, as you get unlimited travel on all public transit around Lugano.
It is good to know how train tickets work. For starts, in most case (especially in Switzerland) you do not actually buy a train ticket. You buy a transport ticket, good for transport from your origin to your destination by whatever conveyances are needed to make the trip. And most tickets are flexible, not tied to a particular service. So yes, in Como you just buy a return ticket to Lugano, just travel there on the next train. Then in Lugano, just go back when you are done...