Program units that contain unnecessary code (code that can be removed without changing the behavior of that program) are units inviting maintenance problems. You should always be careful to remove any code that is not needed.
Also consider using the compile-time warning to help you identify at least some of these occurrences. Here is an example of doing to to identify code that could be removed (or requiring some other change in the program unit):
ALTER SESSION SET plsql_warnings = 'enable:all'
CREATE OR REPLACE PROCEDURE plch_plw6006
SHOW ERRORS PROCEDURE plch_plw6006
We should, of course, be looking at a much simpler solution.
1. Pure SQL of course does the job nicely:
SELECT animal_name FROM plch_animals
ORDER BY animal_name
2. Or a simple cursor FOR loop:
DBMS_OUTPUT.put_line ('Animals in Alphabetical Order');
FOR rec IN (SELECT animal_name FROM plch_animals
ORDER BY animal_name)