When you enclose something in quotation marks, it is taken as a literal value, so in the first query - where you put it LIKE '%tableA.randomID%'-. MySQL is actually treating what's in the line
Without quotes, it will take on meaning - that is:
WHERE something LIKE tableA.randomID
This actually compares "something" with the value of tableA.randomID, and not with a literal string.
To then include your% wildcards to make your LIKE expression different from the 'equal' comparisons, try the CONCAT () function.
WHERE something LIKE CONCAT("%",tableA.randomID,"%")
, tableA.randomID . 'banana' :
WHERE something LIKE '%banana%'
, : -)