It may be because when Darkbasic compiles the program all separate code files are combined to one single file so to the computer it sees the code like the following.
Boot:
GOSUB Boot_Graphic
PRINT "3"
Boot_Graphic:
PRINT "1"
PRINT "2"
RETURN
Because in the normal program flow there is nothing stopping the program (like a WAIT KEY or END) before the Boot_Graphic label it does it again... but when it sees the RETURN (without the GOSUB) it should crash silently. How you're able to actually see the screen before this program ends is a mystery.
For your main program use this instead to stop the flow from continuing on to Boot_Graphic:
Boot:
GOSUB Boot_Graphic
PRINT "3"
` Stop the action till the user hits a key
wait key
` End the program to prevent silent crash
end
Of course it's much easier with small programs to just use one file rather than multiple files.