For example, in spatial indexing you can implement some widely used algorithms as either traversing the obvious space decomposition tree or doing lookups using projections onto higher dimensionality space-filling curves. The former is "obvious" but all good implementations use the latter code design because it is much more scalable in real systems even though the algorithms are equivalent.
Most algorithm patents with code go for "matches the high-level description of the algorithm" rather than "is an optimal representation of the algorithm given current computer science". That said, in my experience people are pretty good at reconstructing an algorithm implementation from patent descriptions that do not include code, assuming they have some domain expertise (i.e. in the above example, it should not be necessary to explain the representational equivalency of literal space decomposition and projections onto space-filling curves).