Encoding the client IPv4 address into the IPv6 address used for CLAT makes sense if the CLAT is intended to support multiple clients.
So I am guessing they have some mixup between different deployment scenarios: A single CLAT serving all clients on a network vs every client host running their own CLAT.
Maybe some part of the code was originally intended to use the IPv4 address of a physical interface, but once it no longer acquires any IPv4 address from the DHCP server that code falls back to the IPv4 address from the CLAT interface - which is not unique.
I can imagine other deployment scenarios where this code might fail as well. Imagine a number of machines with two network interfaces trying to share the internet connection. If all of those machines are connected to the same IPv6-only network and each do CLAT for clients on distinct LAN segments, then the IPv4 addresses from those distinct LAN segments leaks onto the IPv6-only network and will cause conflicts if those LAN segments happen to be using the same IPv4 addresses.
All of this could be fixed by routing a /96 (or shorter) prefix to each CLAT. But that would require prefix-delegation to each individual host. Another way to address it would be for the CLAT to do stateful NAT in order to only need a single IPv6 address.
Regardless of what solution you prefer, I think we agree that it is sub-optimal to ship code that won’t work in the network configuration you are most likely to encounter in real life.