This has to do with mime types and has nothing to do with whether a file is executable or not. All the scripts I use are of course executable but that doesn't change the fact that the Mime type is different.
Examples:
Busybox has the icon
that is shown in the question.
$ file /bin/busybox
/bin/busybox: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.32, BuildID[sha1]=86b86ebdeb1e423dc1672c2a7408fb83ee70eeb1, stripped
My scripts on the other hand have icons similar to: 
file ~/bin/vdprocessx265.sh
/home/me/bin/vdprocessx265.sh: Bourne-Again shell script, ASCII text executable, with very long lines
As you can see, the bash script while executable is a shell script in ASCII text while busybox is an ELF executable.
using grep on /etc/mime.types makes it even more clear.
grep "exe" /etc/mime.types
application/x-executable
application/x-msdos-program com exe bat dll
grep "sh" /etc/mime.types
Users can add their own types if they wish by creating a ".mime.types"
<---Snip-->
text/x-csh csh
text/x-sh sh
There are a couple good answers to How do I change the icon for a particular file type? that should help you get the results that you want.
This question has answers that go into further detail: Where are file associations stored?
@dim I believe that you'll find that compiling with the -no-pie switch results in a different header
mimetype guesses the appropriate mime type based on the contents of the file. For ELF files (most compiled binaries and shared libraries), the header contains a field e_type which identifies its type. If it is ET_DYN, then mimetype will treat it as a shared library.
By default, gcc/ld will produce binaries which set e_type to ET_EXEC, which get detected as application/x-executable
which causes the mimetype to be guessed diferently as explained by this StackOverflow answer hence the different icon.
Sources:
Where are file associations stored?
How do I change the icon for a particular file type?
https://access.redhat.com/blogs/766093/posts/1975793
https://stackoverflow.com/questions/41398444/gcc-creates-mime-type-application-x-sharedlib-instead-of-application-x-applicati