They could have insisted that the original seller fix the violation/evict the tenant before the sale of the unit. This of course would mean a much higher sales price (or no sale), so they didn't. They could have reported the illegal unit to the DBI at anytime in the 10 years that they lived there. Instead they waited until they were basically ready to move out and sell the property.
They were probably hoping that the tenant would eventually move out on her own so that they could either re-rent the unit for a much higher price, or bring the unit up to code and re-sell it. They didn't let her live there for 10 years because they were being nice, they did it because they were hoping to avoid the messy and expensive legal issues that they eventually had to deal with. Regardless they walked away with ~$770K from the appreciation of their property, so not sure why they deserve any sympathy. As far as investments go, they hit a home run.