The Rebels (like Pirates) need to go in to capture/ambush a convoy and jump out in time before reinforcments (more Star Destroyers etc.) arrive ...
so the X-Wing foremostly got all the good parts the Rebels could find, because the Y-Wings were outdated long ago (and are just "upgraded" Bombers)
It isn't really important, if the X-Wing was a stolen (dropped?) Imperial prototype or not - we don't get the backgrounds in the movies, because the facts are simple: the Imperial Warmachine has unlimited ressources - the Alliance has only so much as to win another battle and they hope for the big one (aka Luke & the Force!)