Maintenance plans have a cleanup task, which internally calls the xp_delete_file command. One can generate a T-SQL script from the SSMS GUI for maintenance plans which itself gives the syntax for xp_delete_file.
Many times, the cleanup task fails to cleanup stuff. In the maintenance plan logs all we see is a message that the task took hh:mm:ss seconds. No verbosity is provided, causing all kinds of problems when we troubleshoot cleanup task failures.
The purpose of this bug is to provide improved diagnostic messages for the command (could be exposed under retail trace flag) so that troubleshooting becomes easier.
Though the below repro is convoluted, the reality is that for troubleshooting purposes, the xp_delete_file command should give some errors in case of files which cannot be accessed - either because of permission issues or due to other issues (files locked by another process such as antivirus etc.) The error messages would aid in troubleshooting of problems such as maintenance plan cleanup task not actually cleaning up stuff.