Your start directory is /dir1
so -path ./dir2 won't match. But -path /dir1/dir2 would (if it exists).
Alternatively, cd first:
cd /dir1 && find . ...
and -path ./dir2 will match.
A minor improvement is -exec grep -i "scp" /dev/null {} + so the filename is even printed if there is one matching file. Certain grep versions take -exec grep -Hi "scp" {} + and you don't need the /dev/null trick.
I hope this copies correctly. I tried with the . in front of the path and without. I also moved the /dev/null . That did not make a difference. Neither of these methods are ignoring the /home/local/develop directories.
It must be -exec grep -i "scp" /dev/null {} +
so grep sees another file /dev/null in addition to the collected files from {}
It will never find anything in /dev/null, but if there is only one collected file it will print its filename because it got the /dev/null as another file.
The alternative is -exec grep -Hi "scp" {} + -Hi is short for -H -i -H is: always print the filename even if there is only one file.
2>/dev/null at the very of the find command is something else. It means: suppress all error messages. (And this is done by the calling shell; the find command does not see it.)
If the starting point is /something then it will match /something but never ./something