You're describing the difference between theory and practice. It's one thing to ask an interviewee to write a bubble sort on the spot, quite another to explore the purpose of implementing a bubble sort in a given scenario. In other words, why would a test rely on CS theory rather than an ability to derive a solution regardless of orthodoxy?