Information from the Wikipedia entry:
"Ask Me Why" is a song by The Beatles originally released in the United Kingdom as the B-side of their hit single "Please Please Me." It was also included on their first UK album, Please Please Me.
Written in early 1962, "Ask Me Why" is principally a John Lennon composition, but was credited to Paul McCartney and John Lennon, as were all other Lennon/McCartney originals on the first pressings of Please Please Me album. It was part of their live act prior to their recording contract, and was one of the songs performed at their Parlophone audition in Abbey Road's studio three on 6 June 1962. The song emulates in style that of Smokey Robinson and the Miracles, by whom Lennon was influenced, and draws its opening guitar phrase from the Miracles’ "What’s So Good About Goodbye" (1961).