The liver biopsy is commonly performed to diagnose conditions such as primary or secondary liver cancer, liver cirrhosis, and hepatitis.