Why is it recommended to only post relevant code and not a large chunk of unrelated code?

Posting a large chunk of unrelated code can make it difficult for others to understand the specific issue you are facing and can lead to confusion. It is recommended to only post relevant code so that others can easily identify the problem and provide targeted assistance.

// Example of posting only relevant code
// Relevant code snippet that demonstrates the issue
echo "Hello World";