They didn't want to chose a capital, but still they had to settle their parliament, ministries etc. somehwere, which was Bern. Then they called Bern "federal city" which means they don't officially regard it as a capital although it meets any other criteria. It's quite tricky and probably a bit easier when it comes to Nauru, but officially, Switzerland has no capital.