Latent illnesses happen. Selective ones do too, albeit it may be too early to state the selectivity.
The vendor photo (looks to be Exotic Fish Shop) shows a very thin, emaciated fish, which is sadly typical of the condition of the Doradids brought into the US for sale. Yours in the OP looks much better but we don't know if this is how you received it or this is after you had fattened it up a bit.
Only very general thoughts I could offer because overall little info had been given. For instance, how the fish behaved all this time from arrival and how specifically in the weeks before the passing, have all the water parameters been within the known and reasonable range for this species, any new fish or plants introduced, photos of the dead fish, etc.
Often this can be moot anyway as in general it is pretty hard to diagnose fish ailments and in particular without much experience, without a microscope and knowledge.