Old thread, but I realised there was some missing info.
How instant needle cancelling works
Upon pressing B to start charging needles, there is a 7 frame startup animation that plays before the normal 'needle charging' animation where sheik throws her hand up and down and magically creates more needles. Normally, pressing shield during the needle charging animation would play the 7 frame 'needle cancel' animation BUT there is a 1 frame window (confirmed 1 frame window) at the end of the needle startup animation where if you press shield the needle cancel animation will not play, but shield will come up IMMEDIATELY. Shield must be pressed on the 8th frame after first pressing B.
Input priority (on the ground) is as follows:
Specials > Attacks > Shield > Jump > Stick inputs
Basically what that means is if you buffer multiple moves, the one with most priority will be the one that comes out. This is also why you can instant needle cancel into both specials and attacks, as they both out prioritise shield. When you buffer one of those moves, and then press shield in the 1 frame window, the needles are still cancelled but because of input priority, rather than shield coming up, the buffered move happens.
Input buffering with shield and a is pretty weird though.
A + Shield on same frame = grab
if you buffer on the same frame or if you buffer shield first and hold, then buffer jab = it grabs
butttt then if you buffer jab first and hold, then buffer shield, it jabs
or if you buffer jab first and release then buffer shield, also jabs
or buffering shield first and releasing then buffering jab, it jabs
So I don't have a full explanation for input buffered stuff but just looking at those examples it makes sense why the attack buffers out instead of shield.